Differential D2412 Diff 10323 binaries/data/mods/public/gui/lobby/LobbyPage/Chat/ChatMessageFormat/ChatMessageFormatSay.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/lobby/LobbyPage/Chat/ChatMessageFormat/ChatMessageFormatSay.js
- This file was added.
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
/** | |||||
* This class formats a chat message that was not formatted with any commands. | |||||
*/ | |||||
class ChatMessageFormatSay | |||||
{ | |||||
constructor() | |||||
{ | |||||
this.senderObject = {}; | |||||
this.messageObject = {}; | |||||
} | |||||
// TODO: EscapeText | |||||
format(sender, text) | |||||
{ | |||||
this.senderObject.sender = sender; | |||||
this.messageObject.message = text; | |||||
this.messageObject.sender = setStringTags( | |||||
sprintf(this.ChatSenderFormat, this.senderObject), | |||||
this.SenderTags); | |||||
return sprintf(this.ChatMessageFormat, this.messageObject); | |||||
} | |||||
} | |||||
ChatMessageFormatSay.prototype.ChatSenderFormat = translate("<%(sender)s>"); | |||||
ChatMessageFormatSay.prototype.ChatMessageFormat = translate("%(sender)s %(message)s"); | |||||
/** | |||||
* Used for highlighting the sender of chat messages. | |||||
*/ | |||||
ChatMessageFormatSay.prototype.SenderTags = { "font": "sans-bold-13" }; |
Wildfire Games · Phabricator