Differential D2412 Diff 10323 binaries/data/mods/public/gui/lobby/LobbyPage/Chat/ChatMessageFormat/ChatMessagePrivateWrapper.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/lobby/LobbyPage/Chat/ChatMessageFormat/ChatMessagePrivateWrapper.js
- This file was added.
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
/** | |||||
* This class adds an indication that the chat message was a private message to the given text. | |||||
*/ | |||||
class ChatMessagePrivateWrapper | |||||
{ | |||||
constructor() | |||||
{ | |||||
this.messageObject = { | |||||
"private": setStringTags(this.PrivateFormat, this.PrivateMessageTags) | |||||
}; | |||||
} | |||||
// TODO: EscapeText | |||||
format(text) | |||||
{ | |||||
this.messageObject.message = text; | |||||
return sprintf(this.PrivateMessageFormat, this.messageObject); | |||||
} | |||||
} | |||||
ChatMessagePrivateWrapper.prototype.PrivateFormat = translate("Private"); | |||||
ChatMessagePrivateWrapper.prototype.PrivateMessageFormat = translate("(%(private)s) %(message)s"); | |||||
/** | |||||
* Color for private messages in the chat. | |||||
*/ | |||||
ChatMessagePrivateWrapper.prototype.PrivateMessageTags = { "color": "0 150 0" }; |
Wildfire Games · Phabricator