Chat
Manages the game's chat log window and chat history
Constructor Summary
Public Constructor | ||
public |
constructor(game: Game) Default constructor |
Member Summary
Public Members | ||
public |
button: DOMElement Jquery reference to the chat button |
|
public |
chat: DOMElement Jquery reference to the chat container |
|
public |
The duration before the chat message starts to fade out |
|
public |
A reference to the timeout for the chat message |
|
public |
Instance of the game object |
|
public |
input: DOMElement Jquery reference to the chat input element |
|
public |
log: DOMElement Jquery reference to the chat logs container |
|
public |
The visibility of the chat containers |
Method Summary
Public Methods | ||
public |
Add a chat message |
|
public |
clean(): * Reset the fade timeout |
|
public |
hideChat(): * Hides the input box for entering chat messages into |
|
public |
hideInput(): * Hide the chat input boxes |
|
public |
Returns true if the input box has focus and is currently active or being typed into |
|
public |
Respond to key enter key presses for chat messages |
|
public |
send(): * Send chat messages to the server via sockets |
|
public |
showChat(): * Show the chat messages box |
|
public |
showInput(): * Show the input box for entering chat messages into |
|
public |
toggle(): * Toggle if they chat UI is visible or not |
Public Constructors
Public Members
Public Methods
public add(label: String, text: String, labelColor: String, textColor: String): * source
Add a chat message
Return:
* | null |
public isActive(): Boolean source
Returns true if the input box has focus and is currently active or being typed into