diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-04-02 20:18:20 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-04-02 20:18:20 +0200 |
commit | d4db73b314e7a31f4e8c0954d747b2ac8214139e (patch) | |
tree | 17ddfede13a500317afd2848c8f610c8030e716a /src | |
parent | e2c459b4334504ef708ac6feca7f7be3faf6630f (diff) | |
download | skyhanni-d4db73b314e7a31f4e8c0954d747b2ac8214139e.tar.gz skyhanni-d4db73b314e7a31f4e8c0954d747b2ac8214139e.tar.bz2 skyhanni-d4db73b314e7a31f4e8c0954d747b2ac8214139e.zip |
Fixed gui edit hotkey opening the gui while typing in neu ah or bz search bar
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt index 7beaff605..cf4b0498e 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt @@ -6,6 +6,8 @@ import at.hannibal2.skyhanni.config.core.config.gui.GuiPositionEditor import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.utils.LorenzUtils import io.github.moulberry.notenoughupdates.NEUOverlay +import io.github.moulberry.notenoughupdates.overlays.AuctionSearchOverlay +import io.github.moulberry.notenoughupdates.overlays.BazaarSearchOverlay import net.minecraft.client.Minecraft import net.minecraft.client.gui.inventory.GuiChest import net.minecraft.client.gui.inventory.GuiEditSign @@ -30,11 +32,14 @@ class GuiEditManager { if (!Keyboard.getEventKeyState()) return val key = if (Keyboard.getEventKey() == 0) Keyboard.getEventCharacter().code + 256 else Keyboard.getEventKey() - if (SkyHanniMod.feature.gui.keyBindOpen == key) { - if (NEUOverlay.searchBarHasFocus) return - if (isInGui()) return - openGuiEditor() - } + if (SkyHanniMod.feature.gui.keyBindOpen != key) return + + if (NEUOverlay.searchBarHasFocus) return + if (AuctionSearchOverlay.shouldReplace()) return + if (BazaarSearchOverlay.shouldReplace()) return + + if (isInGui()) return + openGuiEditor() } @SubscribeEvent(priority = EventPriority.LOWEST) |