From edc3246bd123ea49b10c46284099f1af4773be1d Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Tue, 16 Jan 2024 17:10:24 +0900 Subject: [PATCH] Minor fixes to ItemSelectionButton --- .../TurnBasedMinecraft/client/ItemSelectionButton.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/burnedkirby/TurnBasedMinecraft/client/ItemSelectionButton.java b/src/main/java/com/burnedkirby/TurnBasedMinecraft/client/ItemSelectionButton.java index c859d6e..c5d6134 100644 --- a/src/main/java/com/burnedkirby/TurnBasedMinecraft/client/ItemSelectionButton.java +++ b/src/main/java/com/burnedkirby/TurnBasedMinecraft/client/ItemSelectionButton.java @@ -14,6 +14,7 @@ public class ItemSelectionButton implements Renderable, GuiEventListener, Narrat private int height; TBMItemButtonPress onPress; private int itemStackID; + private boolean focused; public ItemSelectionButton(int x, int y, int widthIn, int heightIn, int itemStackID, TBMItemButtonPress onPress) { this.x = x; @@ -44,17 +45,17 @@ public class ItemSelectionButton implements Renderable, GuiEventListener, Narrat @Override public void setFocused(boolean b) { - + focused = b; } @Override public boolean isFocused() { - return false; + return focused; } @Override public NarrationPriority narrationPriority() { - return null; + return NarrationPriority.FOCUSED; } @Override @@ -70,4 +71,4 @@ public class ItemSelectionButton implements Renderable, GuiEventListener, Narrat } return false; } -} \ No newline at end of file +}