aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/GuiData.kt15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt
index 782f3224a..a96574a2b 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt
@@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.events.InventoryCloseEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.events.NEURenderEvent
import at.hannibal2.skyhanni.events.minecraft.ClientDisconnectEvent
+import at.hannibal2.skyhanni.features.inventory.wardrobe.CustomWardrobeKeybinds
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.DelayedRun
import at.hannibal2.skyhanni.utils.KeyboardManager.isKeyHeld
@@ -40,10 +41,18 @@ object GuiData {
@SubscribeEvent(priority = EventPriority.HIGH)
fun onGuiKeyPress(event: GuiScreenEvent.KeyboardInputEvent.Pre) {
- val (escKey, invKey) = Minecraft.getMinecraft().gameSettings.let {
- Keyboard.KEY_ESCAPE to it.keyBindInventory.keyCode
+ val keys = Minecraft.getMinecraft().gameSettings.let {
+ listOf(
+ Keyboard.KEY_ESCAPE,
+ it.keyBindInventory.keyCode,
+ it.keyBindScreenshot.keyCode,
+ it.keyBindFullscreen.keyCode,
+ )
}
- if (escKey.isKeyHeld() || invKey.isKeyHeld()) return
+ if (keys.any { it.isKeyHeld() }) return
+
+ if (CustomWardrobeKeybinds.allowKeyboardClick()) return
+
if (preDrawEventCancelled) event.isCanceled = true
}