From da6da79186cd45fb592c398c596e2732f5f16bf4 Mon Sep 17 00:00:00 2001 From: minjaesong Date: Thu, 13 Jul 2023 20:08:20 +0900 Subject: [PATCH] fix: previous 'centering' attempt was 8 pixels off --- src/net/torvald/terrarum/modulebasegame/ui/UICrafting.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/torvald/terrarum/modulebasegame/ui/UICrafting.kt b/src/net/torvald/terrarum/modulebasegame/ui/UICrafting.kt index b9212e77a..8245087d4 100644 --- a/src/net/torvald/terrarum/modulebasegame/ui/UICrafting.kt +++ b/src/net/torvald/terrarum/modulebasegame/ui/UICrafting.kt @@ -63,7 +63,7 @@ class UICrafting(val full: UIInventoryFull) : UICanvas(), HasInventory { private var halfSlotOffset = (UIItemInventoryElemSimple.height + listGap) / 2 - private val thisOffsetX = UIInventoryFull.INVENTORY_CELLS_OFFSET_X() + UIItemInventoryElemSimple.height - halfSlotOffset + private val thisOffsetX = UIInventoryFull.INVENTORY_CELLS_OFFSET_X() + UIItemInventoryElemSimple.height + listGap - halfSlotOffset private val thisOffsetX2 = thisOffsetX + (listGap + UIItemInventoryElemWide.height) * 7 private val thisXend = thisOffsetX + (listGap + UIItemInventoryElemWide.height) * 13 - listGap private val thisOffsetY = UIInventoryFull.INVENTORY_CELLS_OFFSET_Y()