aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java4
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java
index df5108c..d6928ee 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java
@@ -37,13 +37,13 @@ public class CottonClientScreen extends Screen implements CottonScreenImpl {
protected WWidget lastResponder = null;
public CottonClientScreen(GuiDescription description) {
- super(new LiteralText(""));
- this.description = description;
+ this(new LiteralText(""), description);
}
public CottonClientScreen(Text title, GuiDescription description) {
super(title);
this.description = description;
+ description.getRootPanel().validate(description);
}
public GuiDescription getDescription() {
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 9c344cd..dba1add 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
@@ -50,6 +50,7 @@ public class CottonInventoryScreen<T extends SyncedGuiDescription> extends Handl
height = 18*9;
this.backgroundWidth = 18*9;
this.backgroundHeight = 18*9;
+ description.getRootPanel().validate(description);
}
/*