aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrqnny <45723631+frqnny@users.noreply.github.com>2021-07-07 10:03:34 -0400
committerGitHub <noreply@github.com>2021-07-07 17:03:34 +0300
commit7bd5907ce638f7dfe8cb81d48dbfd2622c9408c0 (patch)
treeaa601be5cb48943e496ec8e28d6f19219378eafb
parent5db5737b9dc9ab2f1f97ba42237c034579586d74 (diff)
downloadLibGui-7bd5907ce638f7dfe8cb81d48dbfd2622c9408c0.tar.gz
LibGui-7bd5907ce638f7dfe8cb81d48dbfd2622c9408c0.tar.bz2
LibGui-7bd5907ce638f7dfe8cb81d48dbfd2622c9408c0.zip
Fix WScrollPanel validation issue (#121)
* Fix WScrollPanel validation issue * Fix damn checkstyle amirite
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollPanel.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollPanel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollPanel.java
index b3513cb..4b33caa 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollPanel.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollPanel.java
@@ -5,6 +5,7 @@ import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.util.TriState;
import net.minecraft.client.util.math.MatrixStack;
+import io.github.cottonmc.cotton.gui.GuiDescription;
import io.github.cottonmc.cotton.gui.widget.data.Axis;
import io.github.cottonmc.cotton.gui.widget.data.InputResult;
@@ -149,4 +150,12 @@ public class WScrollPanel extends WClippedPanel {
return InputResult.IGNORED;
}
+
+ @Override
+ public void validate(GuiDescription c) {
+ //you have to validate these ones manually since they are not in children list
+ this.horizontalScrollBar.validate(c);
+ this.verticalScrollBar.validate(c);
+ super.validate(c);
+ }
}