public interface Chat
extends de.lessvoid.nifty.controls.NiftyControl
Modifier and Type | Method and Description |
---|---|
void |
addPlayer(String playerName,
de.lessvoid.nifty.render.NiftyImage playerIcon)
This method is called when a new player enters the room.
|
void |
addPlayer(String playerName,
de.lessvoid.nifty.render.NiftyImage playerIcon,
String style)
This method is called when a new player enters the room.
|
List<ChatEntryModelClass> |
getLines()
This method returns all the chatlines in the chat.
|
List<ChatEntryModelClass> |
getPlayers()
This method returns the current list of players in the chat.
|
void |
receivedChatLine(String text,
de.lessvoid.nifty.render.NiftyImage icon)
This method is called when a chat line is received which should be displayed in
the chat control.
|
void |
receivedChatLine(String text,
de.lessvoid.nifty.render.NiftyImage icon,
String style)
This method is called when a chat line is received which should be displayed in
the chat control.
|
void |
removePlayer(String playerName)
This method is called when a player leaves the rome and needs to be
removed from the list.
|
void |
update()
Updates the lists to reflecct any changes made to them,
outside of the addPlayer, removePlayer and
|
void receivedChatLine(String text, de.lessvoid.nifty.render.NiftyImage icon)
text
- The text to display.icon
- Optionally, an icon can be supplied which is then displayed at
the start of the chat line.void receivedChatLine(String text, de.lessvoid.nifty.render.NiftyImage icon, String style)
text
- The text to display.icon
- Optionally, an icon can be supplied which is then displayed at
the start of the chat line.style
- The custom style for this particular chatline.void addPlayer(String playerName, de.lessvoid.nifty.render.NiftyImage playerIcon)
playerName
- The player to add.playerIcon
- Optionally, an icon can be supplied which is then displayed in
front of the player name.void addPlayer(String playerName, de.lessvoid.nifty.render.NiftyImage playerIcon, String style)
playerName
- The player to add.playerIcon
- Optionally, an icon can be supplied which is then displayed in
front of the player name.style
- The custom style for this player. This style is depicted in the
player list.void removePlayer(String playerName)
playerName
- The player name to remove.List<ChatEntryModelClass> getPlayers()
List<ChatEntryModelClass> getLines()
void update()
Copyright © 2013. All Rights Reserved.