Differential D2483 Diff 10698 binaries/data/mods/public/gui/gamesetup/GameSettings/PlayerSettingControlManager.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesetup/GameSettings/PlayerSettingControlManager.js
- This file was added.
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
/** | |||||
* Each property of this class is a class that inherits GameSettingControl and is | |||||
* instantiated by the PlayerSettingControlManager. | |||||
*/ | |||||
class PlayerSettingControls | |||||
{ | |||||
} | |||||
/** | |||||
* The purpose of the PlayerSettingControlManager is to own all controls that handle a property of g_GameAttributes.settings.PlayerData. | |||||
*/ | |||||
class PlayerSettingControlManager | |||||
{ | |||||
constructor(playerIndex, gamesetupPage, gameSettingsControl, mapCache, netMessages, playerAssignmentsControl) | |||||
{ | |||||
this.playerFrame = new PlayerFrame(playerIndex, gameSettingsControl); | |||||
this.playerName = new PlayerName(playerIndex, netMessages, gameSettingsControl, playerAssignmentsControl); | |||||
this.playerConfigButton = new PlayerConfigButton(playerIndex, gameSettingsControl, playerAssignmentsControl); | |||||
this.playerSettingControls = {}; | |||||
for (let name in PlayerSettingControls) | |||||
this.playerSettingControls[name] = | |||||
new PlayerSettingControls[name]( | |||||
undefined, undefined, playerIndex, gamesetupPage, gameSettingsControl, mapCache, netMessages, playerAssignmentsControl); | |||||
} | |||||
addAutocompleteEntries(autocomplete) | |||||
{ | |||||
for (let name in this.playerSettingControls) | |||||
this.playerSettingControls[name].addAutocompleteEntries(name, autocomplete); | |||||
} | |||||
} |
Wildfire Games · Phabricator