diff options
author | Juuz <6596629+Juuxel@users.noreply.github.com> | 2022-09-06 14:35:56 +0300 |
---|---|---|
committer | Juuz <6596629+Juuxel@users.noreply.github.com> | 2022-09-06 14:35:56 +0300 |
commit | 1146695996bc5a46e38cae619a271dbdad66f3ac (patch) | |
tree | 2ad9ec256e33a5e0e1e3594131b8ced3506cac03 /src | |
parent | 76344e9eb57b77c3ef2a6405e8c9752c959d2d0e (diff) | |
download | LibGui-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')
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java | 5 |
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. |