aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/kotlin/moe/nea/firmament/gui/config/KeyBindingHandler.kt3
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()