Differential D3711 Diff 16562 binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Checkboxes/LockedTeams.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Checkboxes/LockedTeams.js
Show All 16 Lines | GameSettingControls.LockedTeams = class LockedTeams extends GameSettingControlCheckbox | ||||
{ | { | ||||
this.setEnabled(g_GameSettings.map.type != "scenario" && g_GameSettings.lockedTeams.available); | this.setEnabled(g_GameSettings.map.type != "scenario" && g_GameSettings.lockedTeams.available); | ||||
this.setChecked(g_GameSettings.lockedTeams.enabled); | this.setChecked(g_GameSettings.lockedTeams.enabled); | ||||
} | } | ||||
onPress(checked) | onPress(checked) | ||||
{ | { | ||||
g_GameSettings.lockedTeams.setEnabled(checked); | g_GameSettings.lockedTeams.setEnabled(checked); | ||||
this.gameSettingsControl.setNetworkGameAttributes(); | this.gameSettingsControl.setNetworkInitAttributes(); | ||||
} | } | ||||
}; | }; | ||||
GameSettingControls.LockedTeams.prototype.TitleCaption = | GameSettingControls.LockedTeams.prototype.TitleCaption = | ||||
translate("Teams Locked"); | translate("Teams Locked"); | ||||
GameSettingControls.LockedTeams.prototype.Tooltip = | GameSettingControls.LockedTeams.prototype.Tooltip = | ||||
translate("Toggle locked teams."); | translate("Toggle locked teams."); | ||||
/** | /** | ||||
* In multiplayer mode, players negotiate teams before starting the match and | * In multiplayer mode, players negotiate teams before starting the match and | ||||
* expect to play the match with these teams unless explicitly stated otherwise during the match settings. | * expect to play the match with these teams unless explicitly stated otherwise during the match settings. | ||||
* For singleplayermode, preserve the historic default of open diplomacies. | * For singleplayermode, preserve the historic default of open diplomacies. | ||||
*/ | */ | ||||
GameSettingControls.LockedTeams.prototype.DefaultValue = Engine.HasNetClient(); | GameSettingControls.LockedTeams.prototype.DefaultValue = Engine.HasNetClient(); |
Wildfire Games · Phabricator