aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorJuuz <6596629+Juuxel@users.noreply.github.com>2022-09-06 14:35:56 +0300
committerJuuz <6596629+Juuxel@users.noreply.github.com>2022-09-06 14:35:56 +0300
commit1146695996bc5a46e38cae619a271dbdad66f3ac (patch)
tree2ad9ec256e33a5e0e1e3594131b8ced3506cac03 /src/main/java
parent76344e9eb57b77c3ef2a6405e8c9752c959d2d0e (diff)
downloadLibGui-1146695996bc5a46e38cae619a271dbdad66f3ac.tar.gz
LibGui-1146695996bc5a46e38cae619a271dbdad66f3ac.tar.bz2
LibGui-1146695996bc5a46e38cae619a271dbdad66f3ac.zip
Fix unfocusing item slots not resetting the focused slot to -1
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java
index ec8ae96..fd94100 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java
@@ -407,6 +407,11 @@ public class WItemSlot extends WWidget {
}
}
+ @Override
+ public void onFocusLost() {
+ focusedSlot = -1;
+ }
+
/**
* Adds a change listener to this slot.
* Does nothing if the listener is already registered.