aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/gui/config/IntegerHandler.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/gui/config/IntegerHandler.kt')
-rw-r--r--src/main/kotlin/gui/config/IntegerHandler.kt6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/kotlin/gui/config/IntegerHandler.kt b/src/main/kotlin/gui/config/IntegerHandler.kt
index 31ce90f..ab0237a 100644
--- a/src/main/kotlin/gui/config/IntegerHandler.kt
+++ b/src/main/kotlin/gui/config/IntegerHandler.kt
@@ -3,6 +3,7 @@
package moe.nea.firmament.gui.config
import io.github.notenoughupdates.moulconfig.common.IMinecraft
+import io.github.notenoughupdates.moulconfig.common.text.StructuredText
import io.github.notenoughupdates.moulconfig.gui.component.RowComponent
import io.github.notenoughupdates.moulconfig.gui.component.SliderComponent
import io.github.notenoughupdates.moulconfig.gui.component.TextComponent
@@ -12,6 +13,7 @@ import kotlinx.serialization.json.JsonPrimitive
import kotlinx.serialization.json.int
import kotlinx.serialization.json.jsonPrimitive
import moe.nea.firmament.util.FirmFormatters
+import moe.nea.firmament.util.data.ManagedConfig
class IntegerHandler(val config: ManagedConfig, val min: Int, val max: Int) : ManagedConfig.OptionHandler<Int> {
override fun toJson(element: Int): JsonElement? {
@@ -26,8 +28,8 @@ class IntegerHandler(val config: ManagedConfig, val min: Int, val max: Int) : Ma
guiAppender.appendLabeledRow(
opt.labelText,
RowComponent(
- TextComponent(IMinecraft.instance.defaultFontRenderer,
- { FirmFormatters.formatCommas(opt.value, 0) },
+ TextComponent(IMinecraft.INSTANCE.defaultFontRenderer,
+ { StructuredText.of(FirmFormatters.formatCommas(opt.value, 0)) },
40,
TextComponent.TextAlignment.CENTER,
true,