Differential D4191 Diff 18493 ps/trunk/binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Checkboxes/AlliedView.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Checkboxes/AlliedView.js
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
GameSettingControls.AlliedView = class AlliedView extends GameSettingControlCheckbox | |||||
{ | |||||
constructor(...args) | |||||
{ | |||||
super(...args); | |||||
g_GameSettings.mapExploration.watch(() => this.render(), ["allied"]); | |||||
g_GameSettings.map.watch(() => this.render(), ["type"]); | |||||
this.render(); | |||||
} | |||||
render() | |||||
{ | |||||
this.setEnabled(g_GameSettings.map.type != "scenario"); | |||||
this.setChecked(g_GameSettings.mapExploration.allied); | |||||
} | |||||
onPress(checked) | |||||
{ | |||||
g_GameSettings.mapExploration.setAllied(checked); | |||||
this.gameSettingsController.setNetworkInitAttributes(); | |||||
} | |||||
}; | |||||
// Translation: View what your allies can see. | |||||
GameSettingControls.AlliedView.prototype.TitleCaption = | |||||
translate("Allied View"); | |||||
// Translation: Enable viewing what your allies can see from the start of the game. | |||||
GameSettingControls.AlliedView.prototype.Tooltip = | |||||
translate("Toggle allied view (see what your allies see)."); |
Wildfire Games · Phabricator