From 33e206f9fe4c3dfef48524703dbdb99e8925cb7c Mon Sep 17 00:00:00 2001 From: xtex Date: Tue, 25 Jul 2023 11:32:14 +0800 Subject: [PATCH] fix: floating offset --- common/src/main/kotlin/quaedam/shell/ProjectionEffectShell.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/kotlin/quaedam/shell/ProjectionEffectShell.kt b/common/src/main/kotlin/quaedam/shell/ProjectionEffectShell.kt index 6f0a609..8896759 100644 --- a/common/src/main/kotlin/quaedam/shell/ProjectionEffectShell.kt +++ b/common/src/main/kotlin/quaedam/shell/ProjectionEffectShell.kt @@ -34,10 +34,10 @@ class ProjectionEffectShell(val effect: ProjectionEffect) { row(key) { object : AbstractSliderButton( 0, 0, width, height, - Component.literal(property.get().toString()), (property.get() - range.start) / len + Component.literal(String.format("%.2f", property.get())), (property.get() - range.start) / len ) { override fun updateMessage() { - message = Component.literal(property.get().toString()) + message = Component.literal(String.format("%.2f", property.get())) } override fun applyValue() {