aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/gui/config/GuiAppender.kt
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-07-11 21:01:58 +0200
committernea <nea@nea.moe>2023-07-11 21:01:58 +0200
commit4d93f475aadc42c4bf83c3a0749af41659235c71 (patch)
treec8e01710defe66e06c50fa962c72fdac66a35a1f /src/main/kotlin/moe/nea/firmament/gui/config/GuiAppender.kt
parent4444fcca44d9a53c8162d69e0e9f19fd214c2f54 (diff)
downloadfirmament-4d93f475aadc42c4bf83c3a0749af41659235c71.tar.gz
firmament-4d93f475aadc42c4bf83c3a0749af41659235c71.tar.bz2
firmament-4d93f475aadc42c4bf83c3a0749af41659235c71.zip
Bulk commit
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/gui/config/GuiAppender.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/gui/config/GuiAppender.kt8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/gui/config/GuiAppender.kt b/src/main/kotlin/moe/nea/firmament/gui/config/GuiAppender.kt
index d9d32f0..f298c76 100644
--- a/src/main/kotlin/moe/nea/firmament/gui/config/GuiAppender.kt
+++ b/src/main/kotlin/moe/nea/firmament/gui/config/GuiAppender.kt
@@ -29,7 +29,7 @@ class GuiAppender(val width: Int) {
internal val panel = WGridPanel().also { it.setGaps(4, 4) }
internal val reloadables = mutableListOf<(() -> Unit)>()
fun set(x: Int, y: Int, w: Int, h: Int, widget: WWidget) {
- panel.add(widget, x, y, w, h)
+ panel.add(widget, x, y + row, w, h)
}
@@ -50,13 +50,13 @@ class GuiAppender(val width: Int) {
fun appendSplitRow(left: WWidget, right: WWidget) {
val lw = width / 2
- set(0, row, lw, 1, left)
- set(lw, row, width - lw, 1, right)
+ set(0, 0, lw, 1, left)
+ set(lw, 0, width - lw, 1, right)
skipRows(1)
}
fun appendFullRow(widget: WWidget) {
- set(0, row, width, 1, widget)
+ set(0, 0, width, 1, widget)
skipRows(1)
}
}