aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-08 17:00:01 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-08 17:00:01 +0100
commit6bca12c94980771cd85ebfc94417a8b41bd1d8c9 (patch)
tree398d0c995252b992715b7c91e23404f15968d6c2 /src/main/java/at/hannibal2/skyhanni
parent9867f18f4c5b0f51a6ecc9274152a1fb9d1dedb5 (diff)
downloadskyhanni-6bca12c94980771cd85ebfc94417a8b41bd1d8c9.tar.gz
skyhanni-6bca12c94980771cd85ebfc94417a8b41bd1d8c9.tar.bz2
skyhanni-6bca12c94980771cd85ebfc94417a8b41bd1d8c9.zip
added todo comments
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt5
2 files changed, 6 insertions, 0 deletions
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