From 6bca12c94980771cd85ebfc94417a8b41bd1d8c9 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 8 Dec 2023 17:00:01 +0100 Subject: added todo comments --- src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt | 1 + src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt index 9ce83c23a..c38e20dee 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt @@ -30,6 +30,7 @@ object InventoryUtils { } } + // TODO add cache that persists until the next gui/window open/close packet is sent/received fun openInventoryName() = Minecraft.getMinecraft().currentScreen.let { if (it is GuiChest) { val chest = it.inventorySlots as ContainerChest diff --git a/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt b/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt index a776de1b9..335ac1202 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt @@ -25,6 +25,11 @@ object KeyboardManager { fun isCopyingKeysDown() = isModifierKeyDown() && Keyboard.KEY_C.isKeyHeld() fun isModifierKeyDown() = if (SystemUtils.IS_OS_MAC) isCommandKeyDown() else isControlKeyDown() + + /** + * TODO make use of this function unnecessary: Try to avoid using `isModifierKeyDown` as the only option, + * allow the user to set a different option instead and just set the default key to isModifierKeyDown + */ fun getModifierKeyName(): String = if (SystemUtils.IS_OS_MAC) "Command" else "Control" @SubscribeEvent -- cgit