Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/lobby/LobbyPage/Chat/ChatPanel.js
- This file was added.
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
/** | |||||
* 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. | |||||
* | |||||
* Important: Apply escapeText on player provided input to avoid players breaking the game for everybody. | |||||
*/ | |||||
class ChatMessageEvents | |||||
{ | |||||
} | |||||
class ChatPanel | |||||
{ | |||||
constructor(xmppMessages) | |||||
{ | |||||
this.chatMessagesPanel = new ChatMessagesPanel(xmppMessages); | |||||
this.chatInputPanel = new ChatInputPanel(xmppMessages, this.chatMessagesPanel); | |||||
this.systemMessageFormat = new SystemMessageFormat(); | |||||
this.statusMessageFormat = new StatusMessageFormat(); | |||||
this.chatMessageEvents = {}; | |||||
for (let name in ChatMessageEvents) | |||||
this.chatMessageEvents[name] = new ChatMessageEvents[name]( | |||||
xmppMessages, this.chatMessagesPanel, this.statusMessageFormat, this.systemMessageFormat); | |||||
} | |||||
} |
Wildfire Games · Phabricator