Differential D2577 Diff 11115 binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/Panels/Chat/ChatPanel.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/Panels/Chat/ChatPanel.js
/** | /** | ||||
* Properties of this prototype are classes that subscribe to one or more events and | * Properties of this prototype are classes that subscribe to one or more events and | ||||
* construct a formatted chat message to be displayed on that event. | * construct a formatted chat message to be displayed on that event. | ||||
* | * | ||||
* Important: Apply escapeText on player provided input to avoid players breaking the game for everybody. | * Important: Apply escapeText on player provided input to avoid players breaking the game for everybody. | ||||
*/ | */ | ||||
class ChatMessageEvents | class ChatMessageEvents | ||||
{ | { | ||||
} | } | ||||
class ChatPanel | class ChatPanel | ||||
{ | { | ||||
constructor(gameSettingControlManager, gameSettingsControl, netMessages, playerAssignmentsControl, readyControl, gameSettingsPanel) | constructor(setupWindow, gameSettingControlManager, gameSettingsPanel) | ||||
{ | { | ||||
this.statusMessageFormat = new StatusMessageFormat(); | this.statusMessageFormat = new StatusMessageFormat(); | ||||
this.chatMessagesPanel = new ChatMessagesPanel(gameSettingsPanel); | this.chatMessagesPanel = new ChatMessagesPanel(gameSettingsPanel); | ||||
this.chatInputAutocomplete = new ChatInputAutocomplete(gameSettingControlManager, gameSettingsControl, playerAssignmentsControl); | |||||
this.chatInputPanel = new ChatInputPanel(netMessages, this.chatInputAutocomplete); | this.chatInputAutocomplete = new ChatInputAutocomplete( | ||||
gameSettingControlManager, setupWindow.controls.gameSettingsControl, setupWindow.controls.playerAssignmentsControl); | |||||
this.chatInputPanel = new ChatInputPanel( | |||||
setupWindow.controls.netMessages, this.chatInputAutocomplete); | |||||
this.chatMessageEvents = []; | this.chatMessageEvents = []; | ||||
for (let name in ChatMessageEvents) | for (let name in ChatMessageEvents) | ||||
this.chatMessageEvents.push(new ChatMessageEvents[name]( | this.chatMessageEvents.push(new ChatMessageEvents[name](setupWindow, this.chatMessagesPanel)); | ||||
this.chatMessagesPanel, netMessages, gameSettingsControl, playerAssignmentsControl, readyControl)); | |||||
} | } | ||||
} | } |
Wildfire Games · Phabricator