Properly lay out GUI

This commit is contained in:
Aly 2021-02-06 20:36:54 -08:00
parent 61fb24433d
commit 12f8dc77e0
1 changed files with 6 additions and 4 deletions

View File

@ -13,12 +13,14 @@ class ProgramWorkstationGuiDescription(syncId: Int, playerInventory: PlayerInven
init {
val root = WGridPanel()
setRootPanel(root)
root.setSize(300, 200)
root.setSize(198, 288)
val itemSlot = WItemSlot.of(blockInventory, 0)
root.add(itemSlot, 4, 1)
val itemSlot = WItemSlot(blockInventory, 0, 1, 1, true)
itemSlot.setFilter { stack -> blockInventory.isValid(0, stack) }
root.add(itemSlot, 0, 11)
itemSlot.setLocation(6, 11 * 18 + 15)
root.add(this.createPlayerInventoryPanel(), 0, 3)
root.add(this.createPlayerInventoryPanel(), 2, 11)
root.validate(this)
}