From 7bd5907ce638f7dfe8cb81d48dbfd2622c9408c0 Mon Sep 17 00:00:00 2001 From: frqnny <45723631+frqnny@users.noreply.github.com> Date: Wed, 7 Jul 2021 10:03:34 -0400 Subject: Fix WScrollPanel validation issue (#121) * Fix WScrollPanel validation issue * Fix damn checkstyle amirite --- .../java/io/github/cottonmc/cotton/gui/widget/WScrollPanel.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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); + } } -- cgit