Skip to content

Commit 44fa3b0

Browse files
committed
fix: Crash on some config pages involving checkboxes
1 parent 9cce9dd commit 44fa3b0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/kotlin/gui/CheckboxComponent.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class CheckboxComponent<T>(
2828
val ctx = (context.renderContext as ModernRenderContext).drawContext
2929
ctx.drawGuiTexture(
3030
RenderLayer::getGuiTextured,
31-
if (isEnabled()) Firmament.identifier("firmament:widget/checkbox_checked")
32-
else Firmament.identifier("firmament:widget/checkbox_unchecked"),
31+
if (isEnabled()) Firmament.identifier("widget/checkbox_checked")
32+
else Firmament.identifier("widget/checkbox_unchecked"),
3333
0, 0,
3434
16, 16
3535
)
@@ -43,6 +43,7 @@ class CheckboxComponent<T>(
4343
isClicking = false
4444
if (context.isHovered)
4545
state.set(value)
46+
blur()
4647
return true
4748
}
4849
if (mouseEvent.mouseState && mouseEvent.mouseButton == 0 && context.isHovered) {

0 commit comments

Comments
 (0)