Fix exosuit menu not drawing slots when leaving scroll not at zero
This commit is contained in:
parent
1b039f416f
commit
1e4f33c1bc
@ -91,15 +91,11 @@ class ExoSuitInventoryScreen(menu: ExoSuitInventoryMenu) : MatteryScreen<ExoSuit
|
||||
val offhand = SlotPanel(this, toolbeltLine, menu.offhandSlot)
|
||||
offhand.dock = Dock.RIGHT
|
||||
|
||||
getSlotsRow(0).also { it.parent = mainInventoryLine }
|
||||
getSlotsRow(1).also {
|
||||
it.parent = mainInventoryLine
|
||||
it.y = AbstractSlotPanel.SIZE
|
||||
}
|
||||
|
||||
getSlotsRow(2).also {
|
||||
it.parent = mainInventoryLine
|
||||
it.y = AbstractSlotPanel.SIZE * 2
|
||||
for (i in scrollPanel.scroll .. scrollPanel.scroll + 2) {
|
||||
getSlotsRow(i).also {
|
||||
it.parent = mainInventoryLine
|
||||
it.y = AbstractSlotPanel.SIZE * (i - scrollPanel.scroll)
|
||||
}
|
||||
}
|
||||
|
||||
val topLine = EditablePanel(this, frame, height = 18f * 4f)
|
||||
|
Loading…
Reference in New Issue
Block a user