Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/session/menu.js
Show First 20 Lines • Show All 1,229 Lines • ▼ Show 20 Lines | function openManual() | ||||
Engine.PushGuiPage("page_manual.xml", { | Engine.PushGuiPage("page_manual.xml", { | ||||
"page": "manual/intro", | "page": "manual/intro", | ||||
"title": translate("Manual"), | "title": translate("Manual"), | ||||
"url": "https://trac.wildfiregames.com/wiki/0adManual", | "url": "https://trac.wildfiregames.com/wiki/0adManual", | ||||
"callback": "resumeGame" | "callback": "resumeGame" | ||||
}); | }); | ||||
} | } | ||||
function toggleDeveloperOverlay() | |||||
{ | |||||
if (!g_GameAttributes.settings.CheatsEnabled && !g_IsReplay) | |||||
return; | |||||
let devCommands = Engine.GetGUIObjectByName("devCommands"); | |||||
devCommands.hidden = !devCommands.hidden; | |||||
let message = devCommands.hidden ? | |||||
markForTranslation("The Developer Overlay was closed.") : | |||||
markForTranslation("The Developer Overlay was opened."); | |||||
// Only players can send the simulation chat command | |||||
if (Engine.GetPlayerID() == -1) | |||||
submitChatDirectly(message); | |||||
else | |||||
Engine.PostNetworkCommand({ | |||||
"type": "aichat", | |||||
"message": message, | |||||
"translateMessage": true, | |||||
"translateParameters": [], | |||||
"parameters": {} | |||||
}); | |||||
} | |||||
function closeOpenDialogs() | function closeOpenDialogs() | ||||
{ | { | ||||
closeMenu(); | closeMenu(); | ||||
closeChat(); | closeChat(); | ||||
closeDiplomacy(); | closeDiplomacy(); | ||||
closeTrade(); | closeTrade(); | ||||
closeObjectives(); | closeObjectives(); | ||||
} | } | ||||
Show All 10 Lines |
Wildfire Games · Phabricator