mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
Add registerGlobalGuiPageHotkeys() to common/functions_utility.js to selectively register GUI page hotkeys Allow active GUI pages to close using their corresponding hotkey Move page_hotkeys.xml from gui/hotkeys/ to gui/ Update page_hotkeys.xml references in MainMenuItems and MenuButtons Add default tipScrolling fallback in TipsPage when no initData is provided
45 lines
1 KiB
JavaScript
45 lines
1 KiB
JavaScript
/**
|
|
* Used for gameselection details.
|
|
*/
|
|
const g_VictoryConditions = g_Settings && g_Settings.VictoryConditions;
|
|
|
|
/**
|
|
* Used for the gamelist-filtering.
|
|
*/
|
|
const g_MapSizes = prepareForDropdown(g_Settings && g_Settings.MapSizes);
|
|
|
|
/**
|
|
* Used for the gamelist-filtering.
|
|
*/
|
|
const g_MapTypes = prepareForDropdown(g_Settings && g_Settings.MapTypes);
|
|
|
|
/**
|
|
* Used for civ settings display of the selected game.
|
|
*/
|
|
const g_CivData = loadCivData(false, false);
|
|
|
|
/**
|
|
* Current nickname.
|
|
*/
|
|
var g_Nickname = Engine.LobbyGetNick();
|
|
|
|
/**
|
|
* This class organizes all components of this GUI page.
|
|
*/
|
|
var g_LobbyHandler;
|
|
|
|
/**
|
|
* Called after the XmppConnection succeeded and when returning from a game.
|
|
*/
|
|
async function init(attribs)
|
|
{
|
|
if (g_Settings)
|
|
return new Promise(closePageCallback =>
|
|
{
|
|
registerGlobalGuiPageHotkeys(["options", "hotkeys", "civinfo", "structree", "catafalque", "mapbrowser", "manual", "tips"]);
|
|
g_LobbyHandler = new LobbyHandler(closePageCallback, attribs && attribs.dialog);
|
|
});
|
|
|
|
error("Could not load settings");
|
|
return undefined;
|
|
}
|