aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gradle.properties2
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java12
2 files changed, 9 insertions, 5 deletions
diff --git a/gradle.properties b/gradle.properties
index 0779317..98d9cff 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.10.8
# Mod Properties
- mod_version = 3.3.1
+ mod_version = 3.3.2
maven_group = io.github.cottonmc
archives_base_name = LibGui
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 6ae53d0..370bb68 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
@@ -97,8 +97,12 @@ public class CottonInventoryScreen<T extends SyncedGuiDescription> extends Handl
clearPeers();
basePanel.validate(description);
- backgroundWidth = basePanel.getWidth();
- backgroundHeight = basePanel.getHeight();
+ // 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;
//DEBUG
if (backgroundWidth<16) backgroundWidth=300;
@@ -106,8 +110,8 @@ public class CottonInventoryScreen<T extends SyncedGuiDescription> extends Handl
}
if (!description.isFullscreen()) {
- x = (width / 2) - (backgroundWidth / 2);
- y = (height / 2) - (backgroundHeight / 2);
+ x = (screenWidth / 2) - (backgroundWidth / 2);
+ y = (screenHeight / 2) - (backgroundHeight / 2);
titleX = 0;
titleY = 0;
} else {