Differential D2426 Diff 11537 binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/PopulationCap.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/PopulationCap.js
Show All 34 Lines | onMapChange(mapData) | ||||
this.setEnabled(!isScenario && !this.perPlayer); | this.setEnabled(!isScenario && !this.perPlayer); | ||||
if (this.perPlayer) | if (this.perPlayer) | ||||
this.label.caption = this.PerPlayerCaption; | this.label.caption = this.PerPlayerCaption; | ||||
} | } | ||||
onGameAttributesChange() | onGameAttributesChange() | ||||
{ | { | ||||
if (g_GameAttributes.settings.WorldPopulation) | |||||
{ | |||||
this.setHidden(true); | |||||
g_GameAttributes.settings.PopulationCap = undefined; | |||||
} | |||||
else | |||||
{ | |||||
this.setHidden(false); | |||||
if (g_GameAttributes.settings.PopulationCap === undefined) | if (g_GameAttributes.settings.PopulationCap === undefined) | ||||
{ | { | ||||
g_GameAttributes.settings.PopulationCap = g_PopulationCapacities.Population[g_PopulationCapacities.Default]; | g_GameAttributes.settings.PopulationCap = g_PopulationCapacities.Population[g_PopulationCapacities.Default]; | ||||
this.gameSettingsControl.updateGameAttributes(); | this.gameSettingsControl.updateGameAttributes(); | ||||
} | } | ||||
} | } | ||||
} | |||||
onGameAttributesBatchChange() | onGameAttributesBatchChange() | ||||
{ | { | ||||
if (!this.perPlayer) | if (!this.perPlayer) | ||||
this.setSelectedValue(g_GameAttributes.settings.PopulationCap); | this.setSelectedValue(g_GameAttributes.settings.PopulationCap); | ||||
} | } | ||||
onHoverChange() | onHoverChange() | ||||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator