Draw train track icon on thumbnails.

This commit is contained in:
Leonardo Zide
2024-11-14 12:45:34 -08:00
parent 1817fbdab3
commit dd3ab8990e
5 changed files with 9 additions and 3 deletions
+7 -1
View File
@@ -114,11 +114,17 @@ void lcThumbnailManager::DrawThumbnail(lcPartThumbnailId ThumbnailId, lcPartThum
mView->UnbindRenderFramebuffer();
QImage Image = mView->GetRenderFramebufferImage().convertToFormat(QImage::Format_ARGB32);
const char* IconName = nullptr;
if (Info->GetSynthInfo())
IconName = ":/resources/part_flexible.png";
else if (Info->GetTrainTrackInfo())
IconName = ":/resources/part_traintrack.png";
if (IconName)
{
QPainter Painter(&Image);
QImage Icon = QImage(":/resources/flexible.png");
QImage Icon = QImage(IconName);
uchar* ImageBits = Icon.bits();
QRgb TextColor = QApplication::palette().color(QPalette::WindowText).rgba();
int Red = qRed(TextColor);
-1
View File
@@ -7,7 +7,6 @@
// todo:
// add cross 32087.dat and auto replace when going over a straight section
// draw icon on thumbnails
// detect existing connections
// new gizmo mesh
// move config to json
+2 -1
View File
@@ -146,7 +146,8 @@
<file>resources/shaders/unlit_view_sphere_ps.glsl</file>
<file>resources/shaders/unlit_view_sphere_vs.glsl</file>
<file>resources/case.png</file>
<file>resources/flexible.png</file>
<file>resources/part_flexible.png</file>
<file>resources/part_traintrack.png</file>
<file>resources/gear_in.png</file>
</qresource>
</RCC>

Before

Width:  |  Height:  |  Size: 444 B

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B