diff options
author | nea <nea@nea.moe> | 2023-09-09 03:41:11 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-09-09 03:41:11 +0200 |
commit | dd974fcb79014452e6109dbeb008d5413819b73d (patch) | |
tree | 0fbe37beffa6bcee4cbf71fe7ad4db4840aced1b | |
parent | 255e4f5899642e099e7ec7b1a7fe1e0c32ebbc20 (diff) | |
download | Firmament-dd974fcb79014452e6109dbeb008d5413819b73d.tar.gz Firmament-dd974fcb79014452e6109dbeb008d5413819b73d.tar.bz2 Firmament-dd974fcb79014452e6109dbeb008d5413819b73d.zip |
Fix key bindings not being updated until gui switch
[no changelog]
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/gui/config/KeyBindingHandler.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/gui/config/KeyBindingHandler.kt b/src/main/kotlin/moe/nea/firmament/gui/config/KeyBindingHandler.kt index 42cf66c..a9d5a2e 100644 --- a/src/main/kotlin/moe/nea/firmament/gui/config/KeyBindingHandler.kt +++ b/src/main/kotlin/moe/nea/firmament/gui/config/KeyBindingHandler.kt @@ -19,7 +19,7 @@ import net.minecraft.util.Formatting import moe.nea.firmament.keybindings.FirmamentKeyBindings import moe.nea.firmament.keybindings.SavedKeyBinding -class KeyBindingHandler(name: String, managedConfig: ManagedConfig) : ManagedConfig.OptionHandler<SavedKeyBinding> { +class KeyBindingHandler(name: String, val managedConfig: ManagedConfig) : ManagedConfig.OptionHandler<SavedKeyBinding> { init { FirmamentKeyBindings.registerKeyBinding(name, managedConfig) } @@ -106,6 +106,7 @@ class KeyBindingHandler(name: String, managedConfig: ManagedConfig) : ManagedCon if (editing) stroke.styled { it.withColor(Formatting.YELLOW) } button.setLabel(stroke) + managedConfig.save() } updateButton = ::updateLabel updateButton() |