wasd plugin: allow input to chat dialogs
The chat dialogs use the same key listener as the chatbox
This commit is contained in:
@@ -105,7 +105,21 @@ public class WASDCameraPlugin extends Plugin
|
||||
boolean chatboxFocused()
|
||||
{
|
||||
Widget chatboxParent = client.getWidget(WidgetInfo.CHATBOX_PARENT);
|
||||
return chatboxParent != null && chatboxParent.getOnKeyListener() != null;
|
||||
if (chatboxParent == null || chatboxParent.getOnKeyListener() == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// chat dialogs use the same key listener as chat
|
||||
if (client.getWidget(WidgetInfo.DIALOG_NPC) != null
|
||||
|| client.getWidget(WidgetInfo.DIALOG_SPRITE) != null
|
||||
|| client.getWidget(WidgetInfo.DIALOG_OPTION) != null
|
||||
|| client.getWidget(WidgetInfo.DIALOG_PLAYER) != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
|
||||
Reference in New Issue
Block a user