aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java7
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WPlayerInvPanel.java2
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java2
3 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java
index 259e93d..10725ee 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java
@@ -175,6 +175,13 @@ public abstract class WPanel extends WWidget {
return this;
}
+ /**
+ * {@inheritDoc}
+ *
+ * <p>Subclasses should call {@code super.validate(c)} to ensure that children are validated.
+ *
+ * @param c the host GUI description
+ */
@Override
public void validate(GuiDescription c) {
super.validate(c);
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WPlayerInvPanel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WPlayerInvPanel.java
index 91fa547..3879e1f 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WPlayerInvPanel.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WPlayerInvPanel.java
@@ -82,9 +82,9 @@ public class WPlayerInvPanel extends WPlainPanel {
@Override
public void validate(GuiDescription c) {
+ super.validate(c);
if (c != null && label instanceof WLabel) {
((WLabel) label).setColor(c.getTitleColor());
}
}
}
-
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java
index 824a5b2..e615c53 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java
@@ -362,6 +362,8 @@ public class WWidget {
/**
* Creates component peers, lays out children, and initializes animation data for this Widget and all its children.
* The host container must clear any heavyweight peers from its records before this method is called.
+ *
+ * @param host the host GUI description
*/
public void validate(GuiDescription host) {
this.host = host;