aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorJuuxel <6596629+Juuxel@users.noreply.github.com>2021-02-27 17:07:45 +0200
committerJuuxel <6596629+Juuxel@users.noreply.github.com>2021-02-27 17:07:45 +0200
commit13a99174d682a31088fee27990b7c8e38239ee84 (patch)
tree4f36c023c4d993c539626e1674829d09aa2eefcf /src/main/java
parent0ad2ba61b8bebc8a47a04e2c858a60700aaa6d8b (diff)
downloadLibGui-13a99174d682a31088fee27990b7c8e38239ee84.tar.gz
LibGui-13a99174d682a31088fee27990b7c8e38239ee84.tar.bz2
LibGui-13a99174d682a31088fee27990b7c8e38239ee84.zip
Revert "(Hackily) Fix bug with REI overlapping with LibGui screens"
This reverts commit 1a5d29ec
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java12
1 files 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 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<T extends SyncedGuiDescription> 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<T extends SyncedGuiDescription> 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 {