Ticket #4391: splashscreen.patch
File splashscreen.patch, 4.0 KB (added by , 7 years ago) |
---|
-
binaries/data/mods/public/gui/options/options.json
28 28 { 29 29 "type": "boolean", 30 30 "label": "Disable Welcome Screen", 31 "tooltip": "If you disable this screen completely, you may miss important announcements.\nYou can still launch it usingthe main menu.",31 "tooltip": "If you disable this screen, you may miss important announcements. It will nonetheless be reenabled when a new version is available and you can always launch it from the main menu.", 32 32 "parameters": { "config": "splashscreendisable" } 33 33 }, 34 34 { -
binaries/data/mods/public/gui/pregame/mainmenu.js
128 128 { 129 129 g_ShowSplashScreens = false; 130 130 131 if (Engine.ConfigDB_GetValue("user", "splashscreendisable") !== "true" &&131 if (Engine.ConfigDB_GetValue("user", "splashscreendisable") !== "true" || 132 132 Engine.ConfigDB_GetValue("user", "splashscreenversion") < Engine.GetFileMTime("gui/splashscreen/splashscreen.txt")) 133 133 Engine.PushGuiPage("page_splashscreen.xml", { "page": "splashscreen", callback : "SplashScreenClosedCallback" } ); 134 134 else -
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 Engine.GetGUIObjectByName("displaySplashScreen").checked = Engine.ConfigDB_GetValue("user", "splashscreendisable") !== "true"; 5 5 } -
binaries/data/mods/public/gui/splashscreen/splashscreen.xml
16 16 <object name="displaySplashScreenText" size="30 100%-30 100% 100%-8" type="text" style="ModernLeftLabelText"> 17 17 <translatableAttribute id="caption">Show this message in the future</translatableAttribute> 18 18 </object> 19 <object name="displaySplashScreen" size="8 100%-30 22 100%-8" type="checkbox" style="ModernTickBox"/> 19 <object name="displaySplashScreen" size="8 100%-30 22 100%-8" type="checkbox" style="ModernTickBox"> 20 <action on="Press"> 21 let disabled = "" + !this.checked; 22 Engine.ConfigDB_CreateValue("user", "splashscreendisable", disabled); 23 Engine.ConfigDB_WriteValueToFile("user", "splashscreendisable", disabled, "config/user.cfg"); 24 </action> 25 </object> 20 26 </object> 21 27 <object type="button" style="ModernButtonRed" size="50%+5 100%-45 100%-18 100%-17"> 22 28 <translatableAttribute id="caption">Known Issues (web)</translatableAttribute> … … 27 33 <object name="btnOK" type="button" style="ModernButtonRed" size="18 100%-45 50%-5 100%-17" hotkey="cancel"> 28 34 <translatableAttribute id="caption">OK</translatableAttribute> 29 35 <action on="Press"><![CDATA[ 30 let version = Engine.Get GUIObjectByName("displaySplashScreen").checked ? 0 : Engine.GetFileMTime("gui/splashscreen/splashscreen.txt");36 let version = Engine.GetFileMTime("gui/splashscreen/splashscreen.txt"); 31 37 Engine.ConfigDB_CreateValue("user", "splashscreenversion", version); 32 38 Engine.ConfigDB_WriteValueToFile("user", "splashscreenversion", version, "config/user.cfg"); 33 39 Engine.PopGuiPageCB();