diff --git a/common/src/main/kotlin/quaedam/shell/ProjectionEffectShell.kt b/common/src/main/kotlin/quaedam/shell/ProjectionEffectShell.kt index a35733d..4a7b040 100644 --- a/common/src/main/kotlin/quaedam/shell/ProjectionEffectShell.kt +++ b/common/src/main/kotlin/quaedam/shell/ProjectionEffectShell.kt @@ -109,17 +109,25 @@ class ProjectionEffectShell(val effect: ProjectionEffect) { fun intCycle(key: String, property: KMutableProperty0, range: IntProgression) = row(key) { - CycleButton.builder { Component.literal(it.toString()) } + CycleButton.builder { + property.set(it) + Component.literal(it.toString()) + } .displayOnlyValue() .withValues(range.toList()) + .withInitialValue(property.get()) .create(0, 0, width, height, Component.translatable(key)) } fun boolean(key: String, property: KMutableProperty0) = row(key) { - CycleButton.builder { Component.translatable("$key.$it") } + CycleButton.builder { + property.set(it) + Component.translatable("$key.$it") + } .displayOnlyValue() .withValues(listOf(true, false)) + .withInitialValue(property.get()) .create(0, 0, width, height, Component.translatable(key)) }