Differential D2577 Diff 11115 binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSetupPage.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSetupPage.js
/** | /** | ||||
* This class owns all handlers of the gamesetup page, excluding controllers that apply to all subpages and handlers for specific subpages. | * This class owns all handlers of the gamesetup page, excluding controllers that apply to all subpages and handlers for specific subpages. | ||||
*/ | */ | ||||
class GameSetupPage | SetupWindowPages.GameSetupPage = class | ||||
{ | { | ||||
constructor(setupWindow, gameSettingsControl, playerAssignmentsControl, netMessages, gameRegisterStanza, mapCache, mapFilters, startGameControl, readyControl) | constructor(setupWindow) | ||||
{ | { | ||||
Engine.ProfileStart("GameSetupPage"); | Engine.ProfileStart("GameSetupPage"); | ||||
// This class instance owns all gamesetting GUI controls such as dropdowns and checkboxes visible in this page. | // This class instance owns all gamesetting GUI controls such as dropdowns and checkboxes visible in this page. | ||||
this.gameSettingControlManager = | this.gameSettingControlManager = new GameSettingControlManager(setupWindow); | ||||
new GameSettingControlManager(setupWindow, gameSettingsControl, mapCache, mapFilters, netMessages, playerAssignmentsControl); | |||||
// These classes manage GUI buttons. | // These classes manage GUI buttons. | ||||
{ | { | ||||
let startGameButton = new StartGameButton(setupWindow, startGameControl, netMessages, readyControl, playerAssignmentsControl); | let startGameButton = new StartGameButton(setupWindow); | ||||
let readyButton = new ReadyButton(readyControl, netMessages, playerAssignmentsControl); | let readyButton = new ReadyButton(setupWindow); | ||||
this.panelButtons = { | this.panelButtons = { | ||||
"cancelButton": new CancelButton(setupWindow, startGameButton, readyButton, gameRegisterStanza), | "cancelButton": new CancelButton(setupWindow, startGameButton, readyButton), | ||||
"civInfoButton": new CivInfoButton(), | "civInfoButton": new CivInfoButton(), | ||||
"lobbyButton": new LobbyButton(), | "lobbyButton": new LobbyButton(), | ||||
"readyButton": readyButton, | "readyButton": readyButton, | ||||
"startGameButton": startGameButton | "startGameButton": startGameButton | ||||
}; | }; | ||||
} | } | ||||
// These classes manage GUI Objects. | // These classes manage GUI Objects. | ||||
{ | { | ||||
let gameSettingTabs = new GameSettingTabs(setupWindow, this.panelButtons.lobbyButton); | let gameSettingTabs = new GameSettingTabs(setupWindow, this.panelButtons.lobbyButton); | ||||
let gameSettingsPanel = new GameSettingsPanel( | let gameSettingsPanel = new GameSettingsPanel( | ||||
setupWindow, gameSettingTabs, gameSettingsControl, this.gameSettingControlManager); | setupWindow, gameSettingTabs, this.gameSettingControlManager); | ||||
this.panels = { | this.panels = { | ||||
"chatPanel": new ChatPanel(this.gameSettingControlManager, gameSettingsControl, netMessages, playerAssignmentsControl, readyControl, gameSettingsPanel), | "chatPanel": new ChatPanel(setupWindow, this.gameSettingControlManager, gameSettingsPanel), | ||||
"gameSettingWarning": new GameSettingWarning(gameSettingsControl, this.panelButtons.cancelButton), | "gameSettingWarning": new GameSettingWarning(setupWindow, this.panelButtons.cancelButton), | ||||
"gameDescription": new GameDescription(mapCache, gameSettingTabs, gameSettingsControl), | "gameDescription": new GameDescription(setupWindow, gameSettingTabs), | ||||
"gameSettingsPanel": gameSettingsPanel, | "gameSettingsPanel": gameSettingsPanel, | ||||
"gameSettingsTabs": gameSettingTabs, | "gameSettingsTabs": gameSettingTabs, | ||||
"mapPreview": new MapPreview(gameSettingsControl, mapCache), | "mapPreview": new MapPreview(setupWindow), | ||||
"resetCivsButton": new ResetCivsButton(gameSettingsControl), | "resetCivsButton": new ResetCivsButton(setupWindow), | ||||
"resetTeamsButton": new ResetTeamsButton(gameSettingsControl), | "resetTeamsButton": new ResetTeamsButton(setupWindow), | ||||
"soundNotification": new SoundNotification(netMessages, playerAssignmentsControl), | "soundNotification": new SoundNotification(setupWindow), | ||||
"tipsPanel": new TipsPanel(gameSettingsPanel), | "tipsPanel": new TipsPanel(gameSettingsPanel), | ||||
"tooltip": new Tooltip(this.panelButtons.cancelButton) | "tooltip": new Tooltip(this.panelButtons.cancelButton) | ||||
}; | }; | ||||
} | } | ||||
Engine.ProfileStop(); | Engine.ProfileStop(); | ||||
} | } | ||||
} | } |
Wildfire Games · Phabricator