diff options
| -rw-r--r-- | src/main/kotlin/keybindings/FirmamentKeyBindings.kt | 7 | ||||
| -rw-r--r-- | translations/en_us.json | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/main/kotlin/keybindings/FirmamentKeyBindings.kt b/src/main/kotlin/keybindings/FirmamentKeyBindings.kt index c0fe995..63b7232 100644 --- a/src/main/kotlin/keybindings/FirmamentKeyBindings.kt +++ b/src/main/kotlin/keybindings/FirmamentKeyBindings.kt @@ -6,15 +6,18 @@ import com.mojang.blaze3d.platform.InputConstants import moe.nea.firmament.Firmament import moe.nea.firmament.gui.config.ManagedOption import moe.nea.firmament.util.TestUtil +import moe.nea.firmament.util.data.ManagedConfig object FirmamentKeyBindings { - val cat = KeyMapping.Category(Firmament.identifier("category")) + val cats = mutableMapOf<ManagedConfig.Category, KeyMapping.Category>() + + fun registerKeyBinding(name: String, config: ManagedOption<SavedKeyBinding>) { val vanillaKeyBinding = KeyMapping( name, InputConstants.Type.KEYSYM, -1, - cat + cats.computeIfAbsent(config.element.category) { KeyMapping.Category(Firmament.identifier(it.name.lowercase())) } ) if (!TestUtil.isInTest) { KeyBindingHelper.registerKeyBinding(vanillaKeyBinding) diff --git a/translations/en_us.json b/translations/en_us.json index c871714..fbe530a 100644 --- a/translations/en_us.json +++ b/translations/en_us.json @@ -578,5 +578,10 @@ "firmament.warp-util.mark-excluded": "Firmament: Tried to warp to %s, but it was not unlocked. I will avoid warping there again.", "firmament.warp-util.no-warp-found": "Could not find an unlocked warp in %s", "firmament.waypoint.temporary": "Temporary Waypoint: %s", + "key.category.firmament.dev": "Firmament > Dev", + "key.category.firmament.events": "Firmament > Events", + "key.category.firmament.inventory": "Firmament > Inventory", + "key.category.firmament.items": "Firmament > Items", + "key.category.firmament.misc": "Firmament > Misc", "zzzzzzzzz.lastentry": "Here so every real firmament entry has a trailing ," } |
