From 13a99174d682a31088fee27990b7c8e38239ee84 Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Sat, 27 Feb 2021 17:07:45 +0200 Subject: Revert "(Hackily) Fix bug with REI overlapping with LibGui screens" This reverts commit 1a5d29ec --- .../cottonmc/cotton/gui/client/CottonInventoryScreen.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/main') 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 0510428..d1cd584 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