From e287a34a574ea3f9e86c437a4f84e70412a3b13e Mon Sep 17 00:00:00 2001 From: Max Weber Date: Sat, 1 Dec 2018 16:14:44 -0700 Subject: [PATCH] ChatboxTextInput: Don't set built in update update is desgined to be fully replaced by child classes, so it should not access private state --- .../net/runelite/client/game/chatbox/ChatboxTextInput.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/game/chatbox/ChatboxTextInput.java b/runelite-client/src/main/java/net/runelite/client/game/chatbox/ChatboxTextInput.java index e340027d1a..848f461288 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/chatbox/ChatboxTextInput.java +++ b/runelite-client/src/main/java/net/runelite/client/game/chatbox/ChatboxTextInput.java @@ -95,12 +95,13 @@ public class ChatboxTextInput extends ChatboxInput implements KeyListener, Mouse @Getter private int fontID = FontID.QUILL_8; + @Getter + private boolean built = false; + // This is a lambda so I can have atomic updates for it's captures private ToIntFunction getCharOffset = null; private Predicate isInBounds = null; - private boolean built = false; - @Inject protected ChatboxTextInput(ChatboxPanelManager chatboxPanelManager, ClientThread clientThread) { @@ -209,7 +210,6 @@ public class ChatboxTextInput extends ChatboxInput implements KeyListener, Mouse protected void update() { - this.built = true; Widget container = chatboxPanelManager.getContainerWidget(); container.deleteAllChildren(); @@ -369,6 +369,7 @@ public class ChatboxTextInput extends ChatboxInput implements KeyListener, Mouse @Override protected void open() { + this.built = true; update(); }