diff options
Diffstat (limited to 'src/main/java/dev/isxander/yacl/gui')
4 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/dev/isxander/yacl/gui/controllers/slider/DoubleSliderController.java b/src/main/java/dev/isxander/yacl/gui/controllers/slider/DoubleSliderController.java index 8d74ceb..ed78abd 100644 --- a/src/main/java/dev/isxander/yacl/gui/controllers/slider/DoubleSliderController.java +++ b/src/main/java/dev/isxander/yacl/gui/controllers/slider/DoubleSliderController.java @@ -13,7 +13,7 @@ public class DoubleSliderController implements ISliderController<Double> { /** * Formats doubles to two decimal places */ - public static final Function<Double, Text> DEFAULT_FORMATTER = value -> Text.of(String.format("%.2f", value)); + public static final Function<Double, Text> DEFAULT_FORMATTER = value -> Text.of(String.format("%,.2f", value)); private final Option<Double> option; diff --git a/src/main/java/dev/isxander/yacl/gui/controllers/slider/FloatSliderController.java b/src/main/java/dev/isxander/yacl/gui/controllers/slider/FloatSliderController.java index 6f4192b..4297271 100644 --- a/src/main/java/dev/isxander/yacl/gui/controllers/slider/FloatSliderController.java +++ b/src/main/java/dev/isxander/yacl/gui/controllers/slider/FloatSliderController.java @@ -13,7 +13,7 @@ public class FloatSliderController implements ISliderController<Float> { /** * Formats floats to one decimal place */ - public static final Function<Float, Text> DEFAULT_FORMATTER = value -> Text.of(String.format("%.1f", value)); + public static final Function<Float, Text> DEFAULT_FORMATTER = value -> Text.of(String.format("%,.1f", value)); private final Option<Float> option; diff --git a/src/main/java/dev/isxander/yacl/gui/controllers/slider/IntegerSliderController.java b/src/main/java/dev/isxander/yacl/gui/controllers/slider/IntegerSliderController.java index 0d0d7b9..38efed5 100644 --- a/src/main/java/dev/isxander/yacl/gui/controllers/slider/IntegerSliderController.java +++ b/src/main/java/dev/isxander/yacl/gui/controllers/slider/IntegerSliderController.java @@ -1,7 +1,6 @@ package dev.isxander.yacl.gui.controllers.slider; import dev.isxander.yacl.api.Option; -import dev.isxander.yacl.impl.utils.NumberFormatHelper; import net.minecraft.text.Text; import org.apache.commons.lang3.Validate; @@ -11,7 +10,7 @@ import java.util.function.Function; * {@link ISliderController} for integers. */ public class IntegerSliderController implements ISliderController<Integer> { - public static final Function<Integer, Text> DEFAULT_FORMATTER = value -> Text.of(NumberFormatHelper.formatSmaller(value)); + public static final Function<Integer, Text> DEFAULT_FORMATTER = value -> Text.of(String.format("%,d", value)); private final Option<Integer> option; diff --git a/src/main/java/dev/isxander/yacl/gui/controllers/slider/LongSliderController.java b/src/main/java/dev/isxander/yacl/gui/controllers/slider/LongSliderController.java index d4c71d1..67b6a0e 100644 --- a/src/main/java/dev/isxander/yacl/gui/controllers/slider/LongSliderController.java +++ b/src/main/java/dev/isxander/yacl/gui/controllers/slider/LongSliderController.java @@ -1,7 +1,6 @@ package dev.isxander.yacl.gui.controllers.slider; import dev.isxander.yacl.api.Option; -import dev.isxander.yacl.impl.utils.NumberFormatHelper; import net.minecraft.text.Text; import org.apache.commons.lang3.Validate; @@ -11,7 +10,7 @@ import java.util.function.Function; * {@link ISliderController} for longs. */ public class LongSliderController implements ISliderController<Long> { - public static final Function<Long, Text> DEFAULT_FORMATTER = value -> Text.of(NumberFormatHelper.formatSmaller(value)); + public static final Function<Long, Text> DEFAULT_FORMATTER = value -> Text.of(String.format("%,d", value)); private final Option<Long> option; |