fix: previous 'centering' attempt was 8 pixels off

This commit is contained in:
minjaesong
2023-07-13 20:08:20 +09:00
parent 0767521441
commit da6da79186

View File

@@ -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()