From fdaa5276124335b02ce5631197661f2aa90d165f Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Fri, 4 Jun 2021 15:55:57 +0300 Subject: Add test title to ScrollingTestGui --- .../main/java/io/github/cottonmc/test/client/ScrollingTestGui.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/client/ScrollingTestGui.java b/GuiTest/src/main/java/io/github/cottonmc/test/client/ScrollingTestGui.java index 30bda75..5a8f3f0 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/client/ScrollingTestGui.java +++ b/GuiTest/src/main/java/io/github/cottonmc/test/client/ScrollingTestGui.java @@ -7,9 +7,11 @@ import io.github.cottonmc.cotton.gui.client.LightweightGuiDescription; import io.github.cottonmc.cotton.gui.widget.WBox; import io.github.cottonmc.cotton.gui.widget.WButton; import io.github.cottonmc.cotton.gui.widget.WGridPanel; +import io.github.cottonmc.cotton.gui.widget.WLabel; import io.github.cottonmc.cotton.gui.widget.WLabeledSlider; import io.github.cottonmc.cotton.gui.widget.WScrollPanel; import io.github.cottonmc.cotton.gui.widget.data.Axis; +import io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment; import io.github.cottonmc.cotton.gui.widget.icon.ItemIcon; public class ScrollingTestGui extends LightweightGuiDescription { @@ -23,7 +25,8 @@ public class ScrollingTestGui extends LightweightGuiDescription { box.add(new WButton(new ItemIcon(Items.APPLE))); - root.add(new WScrollPanel(box), 0, 0, 5, 3); + root.add(new WLabel(new LiteralText("Scrolling test")).setVerticalAlignment(VerticalAlignment.CENTER), 0, 0, 5, 2); + root.add(new WScrollPanel(box), 0, 2, 5, 3); root.validate(this); } } -- cgit