aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-02 20:18:20 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-02 20:18:20 +0200
commitd4db73b314e7a31f4e8c0954d747b2ac8214139e (patch)
tree17ddfede13a500317afd2848c8f610c8030e716a /src/main/java/at/hannibal2/skyhanni/data
parente2c459b4334504ef708ac6feca7f7be3faf6630f (diff)
downloadskyhanni-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/main/java/at/hannibal2/skyhanni/data')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt15
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)