Ticket #2116: patch_splashscreen.7.diff
File patch_splashscreen.7.diff, 6.0 KB (added by , 10 years ago) |
---|
-
binaries/data/config/default.cfg
21 21 windowed = false 22 22 23 23 ; Enable/disable the splashscreen 24 splashscreenenable = true 24 splashscreendisable = false 25 ; Splashscreen version (date of last modification). By default, 0 to force splashscreen to appear at first launch. 26 splashscreenversion = 0 25 27 26 28 ; Pause the game on window focus loss (Only applicable to single player mode) 27 29 pauseonfocusloss = true -
binaries/data/mods/public/gui/options/options.js
7 7 [ 8 8 [translate("Windowed Mode"), translate("Start 0 A.D. in a window"), {"config":"windowed"}, "boolean"], 9 9 [translate("Background Pause"), translate("Pause single player games when window loses focus"), {"config":"pauseonfocusloss"}, "boolean"], 10 [translate("Disable Welcome Screen"), translate("If you disable this screen completely, you may miss important announcements.\nYou can still launch it using the main menu."), {"config":"splashscreendisable"}, "boolean"], 10 11 [translate("Developer Overlay"), translate("Show overlay in-game with options such as reveal map, control all units, and change perspective. Designed for use by developers"), {"config":"developeroverlay.enable"}, "boolean"], 11 12 ], 12 13 "graphicsSetting": -
binaries/data/mods/public/gui/pregame/mainmenu.js
158 158 { 159 159 g_ShowSplashScreens = false; 160 160 161 if (Engine.ConfigDB_GetValue("user", "splashscreenenable") !== "false") 162 Engine.PushGuiPage("page_splashscreen.xml", { "page": "splashscreen", callback : "SplashScreenClosedCallback" } ); 161 if (Engine.ConfigDB_GetValue("user", "splashscreendisable") !== "true" 162 && Engine.ConfigDB_GetValue("user", "splashscreenversion") < Engine.GetFileMTime("gui/splashscreen/splashscreen.txt")) 163 Engine.PushGuiPage("page_splashscreen.xml", { "page": "splashscreen", callback : "SplashScreenClosedCallback" } ); 163 164 else 164 165 ShowRenderPathMessage(); 165 166 } -
binaries/data/mods/public/gui/pregame/mainmenu.xml
328 328 pressedScenarioEditorButton(); 329 329 </action> 330 330 </object> 331 332 <object name="submenuWelcomeScreenButton" 333 style="StoneButtonFancy" 334 type="button" 335 size="0 96 100% 124" 336 tooltip_style="pgToolTip" 337 > 338 <translatableAttribute id="caption">Welcome Screen</translatableAttribute> 339 <translatableAttribute id="tooltip">Show the Welcome Screen. Useful if you hid it by mistake.</translatableAttribute> 340 <action on="Press"> 341 <![CDATA[ 342 closeMenu(); 343 Engine.PushGuiPage("page_splashscreen.xml", { "page": "splashscreen", callback : "SplashScreenClosedCallback" } ); 344 ]]> 345 </action> 346 </object> 331 347 </object> 332 348 </object><!-- end of submenu --> 333 349 … … 427 443 <translatableAttribute id="tooltip">Game options and scenario design tools.</translatableAttribute> 428 444 <action on="Press"> 429 445 closeMenu(); 430 openMenu("submenuToolsAndOptions", (this.parent.size.top+this.size.top), (this.size.bottom-this.size.top), 3);446 openMenu("submenuToolsAndOptions", (this.parent.size.top+this.size.top), (this.size.bottom-this.size.top), 4); 431 447 </action> 432 448 </object> 433 449 -
binaries/data/mods/public/gui/splashscreen/splashscreen.js
1 1 function init(data) 2 2 { 3 3 Engine.GetGUIObjectByName("mainText").caption = Engine.TranslateLines(Engine.ReadFile("gui/splashscreen/" + data.page + ".txt")); 4 Engine.GetGUIObjectByName("displaySplashScreen").checked = (Engine.ConfigDB_GetValue("user", "splashscreenversion") < Engine.GetFileMTime("gui/splashscreen/splashscreen.txt")); 4 5 } 5 6 6 7 function openURL(url) -
binaries/data/mods/public/gui/splashscreen/splashscreen.xml
19 19 <object name="displaySplashScreenText" size="20 0 100% 100%" type="text" style="ModernLeftLabelText"> 20 20 <translatableAttribute id="caption">Show this message in the future</translatableAttribute> 21 21 </object> 22 <object name="displaySplashScreen" checked="true"size="0 50%-8 16 50%+8" type="checkbox" style="ModernTickBox"/>22 <object name="displaySplashScreen" size="0 50%-8 16 50%+8" type="checkbox" style="ModernTickBox"/> 23 23 </object> 24 24 </object> 25 25 </object> 26 26 <object name="btnOK" type="button" style="StoneButton" tooltip_style="snToolTip" size="20 100%-42 184 100%-14"> 27 27 <translatableAttribute id="caption">OK</translatableAttribute> 28 28 <action on="Press"><![CDATA[ 29 Engine.ConfigDB_CreateValue("user", "splashscreenenable", Engine.GetGUIObjectByName("displaySplashScreen").checked ? "true" : "false"); 29 if (Engine.GetGUIObjectByName("displaySplashScreen").checked) 30 Engine.ConfigDB_CreateValue("user", "splashscreenversion", 0); 31 else 32 Engine.ConfigDB_CreateValue("user", "splashscreenversion", Engine.GetFileMTime("gui/splashscreen/splashscreen.txt")); 30 33 Engine.ConfigDB_WriteFile("user", "config/user.cfg"); 31 34 Engine.PopGuiPageCB(); 32 35 ]]></action>