Do the right thing with localtype.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@48 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -67,7 +67,7 @@ public class ChatView extends BContainer
|
|||||||
|
|
||||||
public void willEnterPlace (PlaceObject plobj)
|
public void willEnterPlace (PlaceObject plobj)
|
||||||
{
|
{
|
||||||
setSpeakService(plobj.speakService);
|
setSpeakService(plobj.speakService, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void didLeavePlace (PlaceObject plobj)
|
public void didLeavePlace (PlaceObject plobj)
|
||||||
@@ -75,10 +75,11 @@ public class ChatView extends BContainer
|
|||||||
clearSpeakService();
|
clearSpeakService();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSpeakService (SpeakService spsvc)
|
public void setSpeakService (SpeakService spsvc, String localType)
|
||||||
{
|
{
|
||||||
if (spsvc != null) {
|
if (spsvc != null) {
|
||||||
_spsvc = spsvc;
|
_spsvc = spsvc;
|
||||||
|
_localType = localType;
|
||||||
_chatdtr.addChatDisplay(this);
|
_chatdtr.addChatDisplay(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -88,6 +89,7 @@ public class ChatView extends BContainer
|
|||||||
if (_spsvc != null) {
|
if (_spsvc != null) {
|
||||||
_chatdtr.removeChatDisplay(this);
|
_chatdtr.removeChatDisplay(this);
|
||||||
_spsvc = null;
|
_spsvc = null;
|
||||||
|
_localType = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,7 +164,7 @@ public class ChatView extends BContainer
|
|||||||
|
|
||||||
protected boolean handlesType (String localType)
|
protected boolean handlesType (String localType)
|
||||||
{
|
{
|
||||||
return true;
|
return _localType == null || _localType.equals(localType);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean handleInput (String text)
|
protected boolean handleInput (String text)
|
||||||
@@ -191,6 +193,8 @@ public class ChatView extends BContainer
|
|||||||
|
|
||||||
protected ChatDirector _chatdtr;
|
protected ChatDirector _chatdtr;
|
||||||
protected SpeakService _spsvc;
|
protected SpeakService _spsvc;
|
||||||
|
protected String _localType;
|
||||||
|
|
||||||
protected BTextArea _text;
|
protected BTextArea _text;
|
||||||
protected BContainer _incont;
|
protected BContainer _incont;
|
||||||
protected BTextField _input;
|
protected BTextField _input;
|
||||||
|
|||||||
Reference in New Issue
Block a user