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)
|
val offhand = SlotPanel(this, toolbeltLine, menu.offhandSlot)
|
||||||
offhand.dock = Dock.RIGHT
|
offhand.dock = Dock.RIGHT
|
||||||
|
|
||||||
getSlotsRow(0).also { it.parent = mainInventoryLine }
|
for (i in scrollPanel.scroll .. scrollPanel.scroll + 2) {
|
||||||
getSlotsRow(1).also {
|
getSlotsRow(i).also {
|
||||||
it.parent = mainInventoryLine
|
it.parent = mainInventoryLine
|
||||||
it.y = AbstractSlotPanel.SIZE
|
it.y = AbstractSlotPanel.SIZE * (i - scrollPanel.scroll)
|
||||||
}
|
}
|
||||||
|
|
||||||
getSlotsRow(2).also {
|
|
||||||
it.parent = mainInventoryLine
|
|
||||||
it.y = AbstractSlotPanel.SIZE * 2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val topLine = EditablePanel(this, frame, height = 18f * 4f)
|
val topLine = EditablePanel(this, frame, height = 18f * 4f)
|
||||||
|
Loading…
Reference in New Issue
Block a user