From 124eab73545d49b9a5188f09f7cb32714af49b1e Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Sun, 31 Jan 2021 16:08:58 +0200 Subject: Revert "(Hackily) Fix bug with REI overlapping with LibGui screens" This is not needed on 4.0 because of the Insets class. This reverts commit 1a5d29ec --- .../cottonmc/cotton/gui/client/CottonInventoryScreen.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java index f6c1429..d5e42c1 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java @@ -110,12 +110,8 @@ public class CottonInventoryScreen extends Handl clearPeers(); basePanel.validate(description); - // This is needed for REI; otherwise it'll overlap. - // 8 = the padding of BackgroundPainter.VANILLA - int padding = 2 * 8; // TODO: This is awful and bad and should be removed ASAP - - backgroundWidth = basePanel.getWidth() + padding; - backgroundHeight = basePanel.getHeight() + padding; + backgroundWidth = basePanel.getWidth(); + backgroundHeight = basePanel.getHeight(); //DEBUG if (backgroundWidth<16) backgroundWidth=300; @@ -123,8 +119,8 @@ public class CottonInventoryScreen extends Handl } if (!description.isFullscreen()) { - x = (screenWidth / 2) - (backgroundWidth / 2); - y = (screenHeight / 2) - (backgroundHeight / 2); + x = (width / 2) - (backgroundWidth / 2); + y = (height / 2) - (backgroundHeight / 2); titleX = 0; titleY = 0; } else { -- cgit