diff options
author | nea <nea@nea.moe> | 2023-05-29 23:28:52 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-05-29 23:28:52 +0200 |
commit | dd0afac3a8459035827dac36986a690c8a9541ea (patch) | |
tree | 2bc3ab50b69590a6811a8265f4c533163d07457c /src/main/kotlin/moe/nea/firmament/events/HandledScreenKeyPressedEvent.kt | |
parent | c133505e3b1f8e5aeb62c1a0e99513ec4bfcf239 (diff) | |
download | firmament-dd0afac3a8459035827dac36986a690c8a9541ea.tar.gz firmament-dd0afac3a8459035827dac36986a690c8a9541ea.tar.bz2 firmament-dd0afac3a8459035827dac36986a690c8a9541ea.zip |
Add price checker
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/events/HandledScreenKeyPressedEvent.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/events/HandledScreenKeyPressedEvent.kt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/events/HandledScreenKeyPressedEvent.kt b/src/main/kotlin/moe/nea/firmament/events/HandledScreenKeyPressedEvent.kt index 8d19f7e..3c19aa7 100644 --- a/src/main/kotlin/moe/nea/firmament/events/HandledScreenKeyPressedEvent.kt +++ b/src/main/kotlin/moe/nea/firmament/events/HandledScreenKeyPressedEvent.kt @@ -19,10 +19,16 @@ package moe.nea.firmament.events import net.minecraft.client.option.KeyBinding +import moe.nea.firmament.keybindings.IKeyBinding data class HandledScreenKeyPressedEvent(val keyCode: Int, val scanCode: Int, val modifiers: Int) : FirmamentEvent.Cancellable() { companion object : FirmamentEventBus<HandledScreenKeyPressedEvent>() + fun matches(keyBinding: KeyBinding): Boolean { - return keyBinding.matchesKey(keyCode, scanCode) + return matches(IKeyBinding.minecraft(keyBinding)) + } + + fun matches(keyBinding: IKeyBinding): Boolean { + return keyBinding.matches(keyCode, scanCode, modifiers) } } |