aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-02-17 20:51:42 +0100
committerLinnea Gräf <nea@nea.moe>2025-02-17 20:51:42 +0100
commit44fa3b0f31822a451300f2489b49ff6e0c02c3e2 (patch)
treebdbd6c19b99be63e4b73a55d1816bb2617488954 /src/main/kotlin
parent9cce9ddf26b44871e08a1d5d95f39d5e9b99c524 (diff)
downloadFirmament-44fa3b0f31822a451300f2489b49ff6e0c02c3e2.tar.gz
Firmament-44fa3b0f31822a451300f2489b49ff6e0c02c3e2.tar.bz2
Firmament-44fa3b0f31822a451300f2489b49ff6e0c02c3e2.zip
fix: Crash on some config pages involving checkboxes
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/gui/CheckboxComponent.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/kotlin/gui/CheckboxComponent.kt b/src/main/kotlin/gui/CheckboxComponent.kt
index 761c086..fc48661 100644
--- a/src/main/kotlin/gui/CheckboxComponent.kt
+++ b/src/main/kotlin/gui/CheckboxComponent.kt
@@ -28,8 +28,8 @@ class CheckboxComponent<T>(
val ctx = (context.renderContext as ModernRenderContext).drawContext
ctx.drawGuiTexture(
RenderLayer::getGuiTextured,
- if (isEnabled()) Firmament.identifier("firmament:widget/checkbox_checked")
- else Firmament.identifier("firmament:widget/checkbox_unchecked"),
+ if (isEnabled()) Firmament.identifier("widget/checkbox_checked")
+ else Firmament.identifier("widget/checkbox_unchecked"),
0, 0,
16, 16
)
@@ -43,6 +43,7 @@ class CheckboxComponent<T>(
isClicking = false
if (context.isHovered)
state.set(value)
+ blur()
return true
}
if (mouseEvent.mouseState && mouseEvent.mouseButton == 0 && context.isHovered) {