Implement the new ChatDisplay interface.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@47 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -111,11 +111,11 @@ public class ChatView extends BContainer
|
||||
}
|
||||
|
||||
// documentation inherited from interface ChatDisplay
|
||||
public void displayMessage (ChatMessage msg)
|
||||
public boolean displayMessage (ChatMessage msg, boolean alreadyDisplayed)
|
||||
{
|
||||
// we may be restricted in the chat types we handle
|
||||
if (!handlesType(msg.localtype)) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (msg instanceof UserMessage) {
|
||||
@@ -127,12 +127,15 @@ public class ChatView extends BContainer
|
||||
append("<" + umsg.speaker + "> ", ColorRGBA.blue);
|
||||
append(umsg.message + "\n");
|
||||
}
|
||||
return true;
|
||||
|
||||
} else if (msg instanceof SystemMessage) {
|
||||
append(msg.message + "\n", ColorRGBA.red);
|
||||
return true;
|
||||
|
||||
} else {
|
||||
Log.warning("Received unknown message type: " + msg + ".");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user