Add fallback preview image for scenarios
authorWuzzy <Wuzzy2@mail.ru>
Wed, 19 Dec 2018 01:47:41 +0100
changeset 14474 2c3fb87ad1c5
parent 14473 afa4f2140252
child 14475 2113296b7a29
Add fallback preview image for scenarios Feel free to improve the image
QTfrontend/hedgewars.qrc
QTfrontend/res/Scenarios.png
QTfrontend/ui/page/pagetraining.cpp
--- a/QTfrontend/hedgewars.qrc	Wed Dec 19 01:21:20 2018 +0100
+++ b/QTfrontend/hedgewars.qrc	Wed Dec 19 01:47:41 2018 +0100
@@ -45,6 +45,7 @@
         <file>res/Multiplayer.png</file>
         <file>res/Trainings.png</file>
         <file>res/Challenges.png</file>
+        <file>res/Scenarios.png</file>
         <file>res/Background.png</file>
         <file>res/BackgroundChristmas.png</file>
         <file>res/BackgroundEaster.png</file>
Binary file QTfrontend/res/Scenarios.png has changed
--- a/QTfrontend/ui/page/pagetraining.cpp	Wed Dec 19 01:21:20 2018 +0100
+++ b/QTfrontend/ui/page/pagetraining.cpp	Wed Dec 19 01:47:41 2018 +0100
@@ -323,6 +323,9 @@
                 btnPreview->setIcon(QIcon(thumbFile));
             else if (tbw->currentWidget() == lstChallenges)
                 btnPreview->setIcon(QIcon(":/res/Challenges.png"));
+            else if (tbw->currentWidget() == lstScenarios)
+                // TODO: Prettier scenario fallback image
+                btnPreview->setIcon(QIcon(":/res/Scenarios.png"));
             else
                 btnPreview->setIcon(QIcon(":/res/Trainings.png"));