Allow the view to be restricted to a particular type of chat.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3993 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -110,6 +110,11 @@ public class ChatView extends BContainer
|
||||
// documentation inherited from interface ChatDisplay
|
||||
public void displayMessage (ChatMessage msg)
|
||||
{
|
||||
// we may be restricted in the chat types we handle
|
||||
if (!handlesType(msg.localtype)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (msg instanceof UserMessage) {
|
||||
UserMessage umsg = (UserMessage) msg;
|
||||
if (umsg.localtype == ChatCodes.USER_CHAT_TYPE) {
|
||||
@@ -149,6 +154,11 @@ public class ChatView extends BContainer
|
||||
_text.appendText(text);
|
||||
}
|
||||
|
||||
protected boolean handlesType (String localType)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected boolean handleInput (String text)
|
||||
{
|
||||
if (text.length() == 0) {
|
||||
|
||||
Reference in New Issue
Block a user