Skip to content

Commit 5906225

Browse files
committed
Increase staff grid size to 7x7, fix y calculations
1 parent 68012a1 commit 5906225

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Common/src/main/kotlin/gay/object/hexdebug/gui/splicing/SplicingTableScreen.kt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,17 @@ class SplicingTableScreen(
6060
}
6161

6262
// should be multiples of 32, since that's how big the edge parts are
63-
private val staffWidth = 32 * 6
64-
private val staffHeight = 32 * 6
63+
private val staffWidth = 32 * 7
64+
private val staffHeight = 32 * 7
65+
66+
// 32 * 6 is the height that matches the main GUI
67+
// so offset up if taller or down if shorter
68+
private val staffOffsetY: Int = ((32 * 6) - staffHeight) / 2
6569

66-
private val staffMinX get() = leftPos - 14 - staffWidth
6770
private val staffMaxX get() = leftPos - 14
68-
private val staffMinY get() = topPos
69-
private val staffMaxY get() = topPos + staffHeight
71+
private val staffMinX get() = staffMaxX - staffWidth
72+
private val staffMinY get() = topPos + staffOffsetY
73+
private val staffMaxY get() = staffMinY + staffHeight
7074

7175
private val predicateButtons = mutableListOf<Pair<AbstractButton, () -> Boolean>>()
7276

0 commit comments

Comments
 (0)