Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/pregame/mainmenu.js
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | function onTick() | ||||
// 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", {}, ShowRenderPathMessage); | ||||
else | else | ||||
ShowRenderPathMessage(); | ShowRenderPathMessage(); | ||||
} | } | ||||
} | } | ||||
function ShowRenderPathMessage() | function ShowRenderPathMessage() | ||||
{ | { | ||||
// Warn about removing fixed render path | // Warn about removing fixed render path | ||||
Show All 11 Lines | messageBox( | ||||
// 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("https://www.wildfiregames.com/forum/index.php?showtopic=16734"); } ] | [ null, function() { Engine.OpenURL("https://www.wildfiregames.com/forum/index.php?showtopic=16734"); } ] | ||||
); | ); | ||||
} | } | ||||
function SplashScreenClosedCallback() | |||||
{ | |||||
ShowRenderPathMessage(); | |||||
} | |||||
/** | /** | ||||
* Slide menu. | * Slide menu. | ||||
*/ | */ | ||||
function updateMenuPosition(dt) | function updateMenuPosition(dt) | ||||
{ | { | ||||
let submenu = Engine.GetGUIObjectByName("submenu"); | let submenu = Engine.GetGUIObjectByName("submenu"); | ||||
if (submenu.hidden == false) | if (submenu.hidden == false) | ||||
▲ Show 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | else | ||||
); | ); | ||||
} | } | ||||
function getLobbyDisabledByBuild() | function getLobbyDisabledByBuild() | ||||
{ | { | ||||
return translate("Launch the multiplayer lobby to join and host publicly visible games and chat with other players. \\[DISABLED BY BUILD]"); | return translate("Launch the multiplayer lobby to join and host publicly visible games and chat with other players. \\[DISABLED BY BUILD]"); | ||||
} | } | ||||
function getManual() | function openStrucTreePage(page) | ||||
{ | |||||
closeMenu(); | |||||
Engine.PushGuiPage(page, {}, storeCivInfoPage); | |||||
} | |||||
function storeCivInfoPage(data) | |||||
{ | { | ||||
return translate("Manual"); | if (data.nextPage) | ||||
Engine.PushGuiPage(data.nextPage, { "civ": data.civ }, storeCivInfoPage); | |||||
} | } |
Wildfire Games · Phabricator