diff --git a/common/src/main/kotlin/fr/username404/snowygui/config/ConfigScreen.kt b/common/src/main/kotlin/fr/username404/snowygui/config/ConfigScreen.kt index 6906a0c..2499bcd 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/config/ConfigScreen.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/config/ConfigScreen.kt @@ -59,6 +59,7 @@ val SnowyConfigScreen: Screen = object: Screen(translationComponent) { }.setMin(1.1).build(), startBooleanToggle(TranslatableComponent("$confPrefix.behavior.zoom.smoothcamera"), Zoom.smoothCameraOnZoom).setSaveConsumer { Zoom.smoothCameraOnZoom = it + Zoom.execAction() }.build() ) ) diff --git a/common/src/main/kotlin/fr/username404/snowygui/gui/feature/ButtonImpl.kt b/common/src/main/kotlin/fr/username404/snowygui/gui/feature/ButtonImpl.kt index 880b975..917670f 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/gui/feature/ButtonImpl.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/gui/feature/ButtonImpl.kt @@ -55,7 +55,7 @@ sealed class ButtonImpl: ColoredElement(0.0, 0.0, 73, 8, opacity = 0.60F) { field = value hidden = value } - internal val info = this::class.findAnnotation() ?: throw Exception("Missing @ButtonInfo annotaton") + val info = this::class.findAnnotation() ?: throw Exception("Missing @ButtonInfo annotaton") override var color = info.parent.categoryColor; get() { return info.parent.box.color.let { if (field == it) field else it diff --git a/common/src/main/kotlin/fr/username404/snowygui/gui/feature/Zoom.kt b/common/src/main/kotlin/fr/username404/snowygui/gui/feature/Zoom.kt index 5fadb40..be776e0 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/gui/feature/Zoom.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/gui/feature/Zoom.kt @@ -9,7 +9,7 @@ object Zoom: ButtonImpl() { internal var zoomFactor: Double by Configuration @JvmStatic fun getNewZoom(fov: Double): Double = fov / zoomFactor - override fun execAction() { + public override fun execAction() { Minecraft.getInstance().options.smoothCamera = toggled && smoothCameraOnZoom } } \ No newline at end of file