Ticket #2116: patch_splashscreen.5.diff

File patch_splashscreen.5.diff, 3.1 KB (added by Itms, 10 years ago)
  • binaries/data/config/default.cfg

     
    2222
    2323; Enable/disable the splashscreen
    2424splashscreenenable = true
     25; Splashscreen version (date of last modification). By default, 0 to force splashscreen to appear at first launch.
     26splashscreenversion = 0
    2527
    2628; Pause the game on window focus loss (Only applicable to single player mode)
    2729pauseonfocusloss = true
  • binaries/data/mods/public/gui/options/options.js

     
    77    [
    88        [translate("Windowed Mode"), translate("Start 0 A.D. in windowed mode"), {"config":"windowed"}, "boolean"],
    99        [translate("Background Pause"), translate("Pause single player games when window loses focus"), {"config":"pauseonfocusloss"}, "boolean"],
     10        [translate("Enable Notifications"), translate("If you disable notifications completely, you may miss important announcements"), {"config":"splashscreenenable"}, "boolean"],
    1011    ],
    1112    "graphicsSetting":
    1213    [
  • binaries/data/mods/public/gui/pregame/mainmenu.js

     
    158158    {
    159159        g_ShowSplashScreens = false;
    160160
    161         if (Engine.ConfigDB_GetValue("user", "splashscreenenable") !== "false")
    162             Engine.PushGuiPage("page_splashscreen.xml", { "page": "splashscreen", callback : "SplashScreenClosedCallback" } );
     161        if (Engine.ConfigDB_GetValue("user", "splashscreenenable") !== "false"
     162        && Engine.ConfigDB_GetValue("user", "splashscreenversion") != Engine.GetFileMTime("gui/splashscreen/splashscreen.txt"))
     163            Engine.PushGuiPage("page_splashscreen.xml", { "page": "splashscreen", callback : "SplashScreenClosedCallback" } );
    163164        else
    164165            ShowRenderPathMessage();
    165166    }
  • binaries/data/mods/public/gui/splashscreen/splashscreen.xml

     
    2626        <object name="btnOK" type="button" style="StoneButton" tooltip_style="snToolTip" size="24 100%-52 188 100%-24">
    2727            <translatableAttribute id="caption">OK</translatableAttribute>
    2828            <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", Engine.GetFileMTime("gui/splashscreen/splashscreen.txt"));
    3031            Engine.ConfigDB_WriteFile("user", "config/user.cfg");
    3132            Engine.PopGuiPageCB();
    3233            ]]></action>