Differential D2982 Diff 13468 binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/StartingResources.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/StartingResources.js
Show All 18 Lines | if (this.dropdown.hovered != -1) | ||||
this.sprintfArgs.resources = g_StartingResources.Resources[this.dropdown.hovered]; | this.sprintfArgs.resources = g_StartingResources.Resources[this.dropdown.hovered]; | ||||
tooltip = sprintf(this.HoverTooltip, this.sprintfArgs); | tooltip = sprintf(this.HoverTooltip, this.sprintfArgs); | ||||
} | } | ||||
this.dropdown.tooltip = tooltip; | this.dropdown.tooltip = tooltip; | ||||
} | } | ||||
onMapChange(mapData) | onMapChange(mapData) | ||||
{ | { | ||||
let mapValue = | let mapValue; | ||||
mapData && | if (mapData && | ||||
mapData.settings && | mapData.settings && | ||||
mapData.settings.StartingResources || undefined; | mapData.settings.StartingResources !== undefined) | ||||
mapValue = mapData.settings.StartingResources; | |||||
if (mapValue !== undefined && mapValue != g_GameAttributes.settings.StartingResources) | if (mapValue !== undefined && mapValue != g_GameAttributes.settings.StartingResources) | ||||
{ | { | ||||
g_GameAttributes.settings.StartingResources = mapValue; | g_GameAttributes.settings.StartingResources = mapValue; | ||||
this.gameSettingsControl.updateGameAttributes(); | this.gameSettingsControl.updateGameAttributes(); | ||||
} | } | ||||
let isScenario = g_GameAttributes.mapType == "scenario"; | let isScenario = g_GameAttributes.mapType == "scenario"; | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator