1 class SplashScreenHandler
3 constructor(initData, hotloadData)
5 this.showSplashScreen = hotloadData ? hotloadData.showSplashScreen : initData && initData.isStartup;
7 this.mainMenuPage = Engine.GetGUIObjectByName("mainMenuPage");
8 this.mainMenuPage.onTick = this.onFirstTick.bind(this);
13 // Only show splash screen(s) once at startup, but not again after hotloading
15 "showSplashScreen": this.showSplashScreen
19 // Don't call this from the init function in order to not crash when opening the new page on init on hotloading
20 // and not possibly crash when opening the new page on init and throwing a JS error.
23 if (this.showSplashScreen)
26 delete this.mainMenuPage.onTick;
31 this.showSplashScreen = false;
33 if (Engine.ConfigDB_GetValue("user", "gui.splashscreen.enable") === "true" ||
34 Engine.ConfigDB_GetValue("user", "gui.splashscreen.version") < Engine.GetFileMTime("gui/splashscreen/splashscreen.txt"))
35 Engine.PushGuiPage("page_splashscreen.xml", {}, this.showRenderPathMessage);
37 this.showRenderPathMessage();
40 showRenderPathMessage()
42 // Warn about removing fixed render path
43 if (Engine.Renderer_GetRenderPath() != "fixed")
48 "[font=\"sans-bold-16\"]" +
49 sprintf(translate("%(warning)s You appear to be using non-shader (fixed function) graphics. This option will be removed in a future 0 A.D. release, to allow for more advanced graphics features. We advise upgrading your graphics card to a more recent, shader-compatible model."), {
50 "warning": coloredText("Warning:", "200 20 20")
53 // Translation: This is the second paragraph of a warning. The
54 // warning explains that the user is using “non-shader“ graphics,
55 // and that in the future this will not be supported by the game, so
56 // the user will need a better graphics card.
57 translate("Please press \"Read More\" for more information or \"OK\" to continue."),
58 translate("WARNING!"),
59 [translate("OK"), translate("Read More")],
63 Engine.OpenURL("https://www.wildfiregames.com/forum/index.php?showtopic=16734");