Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/pregame/mainmenu.js
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | function onTick() | ||||
g_LastTickTime = now; | g_LastTickTime = now; | ||||
scrollBackgrounds(); | scrollBackgrounds(); | ||||
updateMenuPosition(tickLength); | updateMenuPosition(tickLength); | ||||
if (Engine.IsUserReportEnabled()) | if (Engine.IsUserReportEnabled()) | ||||
Engine.GetGUIObjectByName("userReportEnabledText").caption = | Engine.GetGUIObjectByName("userReportEnabledText").caption = | ||||
'[font="sans-bold-16"]' + translate("Thank you for helping improve 0 A.D.!") + "[/font]\n\n" + | setFont(translate("Thank you for helping improve 0 A.D.!"), "sans-bold-16") + "\n\n" + | ||||
translate("Anonymous feedback is currently enabled.") + "\n" + | translate("Anonymous feedback is currently enabled.") + "\n" + | ||||
sprintf(translate("Status: %(status)s."), { | sprintf(translate("Status: %(status)s."), { | ||||
"status": formatUserReportStatus(Engine.GetUserReportStatus()) | "status": formatUserReportStatus(Engine.GetUserReportStatus()) | ||||
}); | }); | ||||
// Show splash screens here, so we don't interfere with main menu hotloading | // Show splash screens here, so we don't interfere with main menu hotloading | ||||
if (g_ShowSplashScreens) | if (g_ShowSplashScreens) | ||||
{ | { | ||||
g_ShowSplashScreens = false; | g_ShowSplashScreens = false; | ||||
if (Engine.ConfigDB_GetValue("user", "gui.splashscreen.enable") === "true" || | if (Engine.ConfigDB_GetValue("user", "gui.splashscreen.enable") === "true" || | ||||
Engine.ConfigDB_GetValue("user", "gui.splashscreen.version") < Engine.GetFileMTime("gui/splashscreen/splashscreen.txt")) | Engine.ConfigDB_GetValue("user", "gui.splashscreen.version") < Engine.GetFileMTime("gui/splashscreen/splashscreen.txt")) | ||||
Engine.PushGuiPage("page_splashscreen.xml", { "page": "splashscreen", "callback": "SplashScreenClosedCallback" }); | Engine.PushGuiPage("page_splashscreen.xml", { "page": "splashscreen", "callback": "SplashScreenClosedCallback" }); | ||||
else | else | ||||
ShowRenderPathMessage(); | ShowRenderPathMessage(); | ||||
} | } | ||||
} | } | ||||
function ShowRenderPathMessage() | function ShowRenderPathMessage() | ||||
{ | { | ||||
// Warn about removing fixed render path | // Warn about removing fixed render path | ||||
if (Engine.Renderer_GetRenderPath() == "fixed") | if (Engine.Renderer_GetRenderPath() == "fixed") | ||||
messageBox( | messageBox( | ||||
600, 300, | 600, 300, | ||||
"[font=\"sans-bold-16\"]" + | setFont( | ||||
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."), { | 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."), { | ||||
"warning": coloredText("Warning:", "200 20 20") | "warning": coloredText("Warning:", "200 20 20") | ||||
}) + | }) + "\n\n" + | ||||
"\n\n" + | "sans-bold-16"), | ||||
// Translation: This is the second paragraph of a warning. The | // Translation: This is the second paragraph of a warning. The | ||||
// warning explains that the user is using “non-shader“ graphics, | // warning explains that the user is using “non-shader“ graphics, | ||||
// and that in the future this will not be supported by the game, so | // and that in the future this will not be supported by the game, so | ||||
// the user will need a better graphics card. | // the user will need a better graphics card. | ||||
translate("Please press \"Read More\" for more information or \"OK\" to continue."), | translate("Please press \"Read More\" for more information or \"OK\" to continue."), | ||||
translate("WARNING!"), | translate("WARNING!"), | ||||
[translate("OK"), translate("Read More")], | [translate("OK"), translate("Read More")], | ||||
[ null, function() { Engine.OpenURL("http://www.wildfiregames.com/forum/index.php?showtopic=16734"); } ] | [ null, function() { Engine.OpenURL("http://www.wildfiregames.com/forum/index.php?showtopic=16734"); } ] | ||||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator