Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/session/menu.js
Show All 19 Lines | |||||
var MENU_SPEED = 1.2; | var MENU_SPEED = 1.2; | ||||
// Trade menu: step for probability changes | // Trade menu: step for probability changes | ||||
var STEP = 5; | var STEP = 5; | ||||
// Shown in the trade dialog. | // Shown in the trade dialog. | ||||
var g_IdleTraderTextColor = "orange"; | var g_IdleTraderTextColor = "orange"; | ||||
/* | |||||
* Remember opened structure tree or history page. | |||||
*/ | |||||
var g_CivPage = ""; | |||||
/** | /** | ||||
* The barter constants should match with the simulation | * The barter constants should match with the simulation | ||||
* Quantity of goods to sell per click. | * Quantity of goods to sell per click. | ||||
*/ | */ | ||||
const g_BarterResourceSellQuantity = 100; | const g_BarterResourceSellQuantity = 100; | ||||
/** | /** | ||||
* Multiplier to be applied when holding the massbarter hotkey. | * Multiplier to be applied when holding the massbarter hotkey. | ||||
▲ Show 20 Lines • Show All 1,036 Lines • ▼ Show 20 Lines | function openGameSummary() | ||||
}); | }); | ||||
} | } | ||||
function openStrucTree() | function openStrucTree() | ||||
{ | { | ||||
closeOpenDialogs(); | closeOpenDialogs(); | ||||
pauseGame(); | pauseGame(); | ||||
// TODO add info about researched techs and unlocked entities | Engine.PushGuiPage(g_CivPage ? g_CivPage : "page_structree.xml", { "civ": g_Players[g_ViewedPlayer].civ, "callback": "rememberCiv" }); | ||||
Engine.PushGuiPage("page_structree.xml", { | } | ||||
"civ" : g_Players[g_ViewedPlayer].civ, | |||||
"callback": "resumeGame", | function rememberCiv(data) | ||||
}); | { | ||||
g_CivPage = data !== undefined && data.page ? data.page : ""; | |||||
resumeGame(); | |||||
} | } | ||||
/** | /** | ||||
* Pause or resume the game. | * Pause or resume the game. | ||||
* | * | ||||
* @param explicit - true if the player explicitly wants to pause or resume. | * @param explicit - true if the player explicitly wants to pause or resume. | ||||
* If this argument isn't set, a multiplayer game won't be paused and the pause overlay | * If this argument isn't set, a multiplayer game won't be paused and the pause overlay | ||||
* won't be shown in single player. | * won't be shown in single player. | ||||
▲ Show 20 Lines • Show All 128 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator