File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
src/main/kotlin/keybindings Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,18 @@ import com.mojang.blaze3d.platform.InputConstants
66import moe.nea.firmament.Firmament
77import moe.nea.firmament.gui.config.ManagedOption
88import moe.nea.firmament.util.TestUtil
9+ import moe.nea.firmament.util.data.ManagedConfig
910
1011object FirmamentKeyBindings {
11- val cat = KeyMapping .Category (Firmament .identifier(" category" ))
12+ val cats = mutableMapOf<ManagedConfig .Category , KeyMapping .Category >()
13+
14+
1215 fun registerKeyBinding (name : String , config : ManagedOption <SavedKeyBinding >) {
1316 val vanillaKeyBinding = KeyMapping (
1417 name,
1518 InputConstants .Type .KEYSYM ,
1619 - 1 ,
17- cat
20+ cats.computeIfAbsent(config.element.category) { KeyMapping . Category ( Firmament .identifier(it.name.lowercase())) }
1821 )
1922 if (! TestUtil .isInTest) {
2023 KeyBindingHelper .registerKeyBinding(vanillaKeyBinding)
Original file line number Diff line number Diff line change 578578 "firmament.warp-util.mark-excluded" : " Firmament: Tried to warp to %s, but it was not unlocked. I will avoid warping there again." ,
579579 "firmament.warp-util.no-warp-found" : " Could not find an unlocked warp in %s" ,
580580 "firmament.waypoint.temporary" : " Temporary Waypoint: %s" ,
581+ "key.category.firmament.dev" : " Firmament > Dev" ,
582+ "key.category.firmament.events" : " Firmament > Events" ,
583+ "key.category.firmament.inventory" : " Firmament > Inventory" ,
584+ "key.category.firmament.items" : " Firmament > Items" ,
585+ "key.category.firmament.misc" : " Firmament > Misc" ,
581586 "zzzzzzzzz.lastentry" : " Here so every real firmament entry has a trailing ,"
582587}
You can’t perform that action at this time.
0 commit comments