add title manipulation
authornemo
Fri, 30 Mar 2018 11:56:16 -0400
changeset 13309 5ac2bdefa173
parent 13308 e3613c0d3600
child 13310 859643473ef2
add title manipulation
QTfrontend/hedgewars.qrc
QTfrontend/hwconsts.h
QTfrontend/main.cpp
QTfrontend/res/TomatowarsTitle.png
QTfrontend/res/css/qt.css
QTfrontend/ui/page/pagemain.cpp
--- a/QTfrontend/hedgewars.qrc	Fri Mar 30 17:01:30 2018 +0200
+++ b/QTfrontend/hedgewars.qrc	Fri Mar 30 11:56:16 2018 -0400
@@ -4,6 +4,7 @@
         <file>res/css/qt.css</file>
         <file>res/css/chat.css</file>
         <file>res/css/christmas.css</file>
+        <file>res/css/april1.css</file>
         <file>res/css/easter.css</file>
         <file>res/css/birthday.css</file>
         <file>res/hh25x25.png</file>
@@ -73,6 +74,7 @@
         <file>res/BackgroundBirthday.png</file>
         <file>res/Exit.png</file>
         <file>res/HedgewarsTitle.png</file>
+        <file>res/TomatowarsTitle.png</file>
         <file>res/LocalPlay.png</file>
         <file>res/NetworkPlay.png</file>
         <file>res/NetworkPlayDisabled.png</file>
--- a/QTfrontend/hwconsts.h	Fri Mar 30 17:01:30 2018 +0200
+++ b/QTfrontend/hwconsts.h	Fri Mar 30 11:56:16 2018 -0400
@@ -67,6 +67,7 @@
 #define SEASON_CHRISTMAS 2
 #define SEASON_HWBDAY 4
 #define SEASON_EASTER 8
+#define SEASON_APRIL1 16
 
 #define NETGAME_DEFAULT_SERVER "netserver.hedgewars.org"
 #define NETGAME_DEFAULT_PORT 46631
--- a/QTfrontend/main.cpp	Fri Mar 30 17:01:30 2018 +0200
+++ b/QTfrontend/main.cpp	Fri Mar 30 11:56:16 2018 -0400
@@ -96,6 +96,10 @@
         season = SEASON_HWBDAY;
         years_since_foundation = date.year() - 2004;
     }
+    else if (date.month() == 4 && date.day() == 1)
+    {
+        season = SEASON_APRIL1;
+    }
     //Easter?
     else if (calculateEaster(date.year()) == date)
         season = SEASON_EASTER;
@@ -423,6 +427,9 @@
         case SEASON_CHRISTMAS :
             fname = "christmas.css";
             break;
+        case SEASON_APRIL1 :
+            fname = "april1.css";
+            break;
         case SEASON_EASTER :
             fname = "easter.css";
             break;
Binary file QTfrontend/res/TomatowarsTitle.png has changed
--- a/QTfrontend/res/css/qt.css	Fri Mar 30 17:01:30 2018 +0200
+++ b/QTfrontend/res/css/qt.css	Fri Mar 30 11:56:16 2018 -0400
@@ -17,6 +17,11 @@
  *
  *****************************************************************************/
 
+#infoButton 
+{
+border: transparent;
+background: transparent; 
+}
 HWForm,QDialog {
 background-image: url(":/res/Background.png");
 background-position: bottom center;
--- a/QTfrontend/ui/page/pagemain.cpp	Fri Mar 30 17:01:30 2018 +0200
+++ b/QTfrontend/ui/page/pagemain.cpp	Fri Mar 30 11:56:16 2018 -0400
@@ -75,7 +75,7 @@
 
     // button order matters for overlapping (what's on top and what isn't)
     BtnInfo = addButton(":/res/HedgewarsTitle.png", pageLayout, 0, 0, 1, 4, true);
-    BtnInfo->setStyleSheet("border: transparent;background: transparent;");
+	BtnInfo->setObjectName("infoButton");
     BtnInfo->setWhatsThis(tr("Read about who is behind the Hedgewars Project"));
     pageLayout->setAlignment(BtnInfo, Qt::AlignHCenter);