Draw train track icon on thumbnails.
This commit is contained in:
@@ -114,11 +114,17 @@ void lcThumbnailManager::DrawThumbnail(lcPartThumbnailId ThumbnailId, lcPartThum
|
|||||||
mView->UnbindRenderFramebuffer();
|
mView->UnbindRenderFramebuffer();
|
||||||
|
|
||||||
QImage Image = mView->GetRenderFramebufferImage().convertToFormat(QImage::Format_ARGB32);
|
QImage Image = mView->GetRenderFramebufferImage().convertToFormat(QImage::Format_ARGB32);
|
||||||
|
const char* IconName = nullptr;
|
||||||
|
|
||||||
if (Info->GetSynthInfo())
|
if (Info->GetSynthInfo())
|
||||||
|
IconName = ":/resources/part_flexible.png";
|
||||||
|
else if (Info->GetTrainTrackInfo())
|
||||||
|
IconName = ":/resources/part_traintrack.png";
|
||||||
|
|
||||||
|
if (IconName)
|
||||||
{
|
{
|
||||||
QPainter Painter(&Image);
|
QPainter Painter(&Image);
|
||||||
QImage Icon = QImage(":/resources/flexible.png");
|
QImage Icon = QImage(IconName);
|
||||||
uchar* ImageBits = Icon.bits();
|
uchar* ImageBits = Icon.bits();
|
||||||
QRgb TextColor = QApplication::palette().color(QPalette::WindowText).rgba();
|
QRgb TextColor = QApplication::palette().color(QPalette::WindowText).rgba();
|
||||||
int Red = qRed(TextColor);
|
int Red = qRed(TextColor);
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
// todo:
|
// todo:
|
||||||
// add cross 32087.dat and auto replace when going over a straight section
|
// add cross 32087.dat and auto replace when going over a straight section
|
||||||
// draw icon on thumbnails
|
|
||||||
// detect existing connections
|
// detect existing connections
|
||||||
// new gizmo mesh
|
// new gizmo mesh
|
||||||
// move config to json
|
// move config to json
|
||||||
|
|||||||
+2
-1
@@ -146,7 +146,8 @@
|
|||||||
<file>resources/shaders/unlit_view_sphere_ps.glsl</file>
|
<file>resources/shaders/unlit_view_sphere_ps.glsl</file>
|
||||||
<file>resources/shaders/unlit_view_sphere_vs.glsl</file>
|
<file>resources/shaders/unlit_view_sphere_vs.glsl</file>
|
||||||
<file>resources/case.png</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>
|
<file>resources/gear_in.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 444 B After Width: | Height: | Size: 444 B |
Binary file not shown.
|
After Width: | Height: | Size: 188 B |
Reference in New Issue
Block a user