diff options
author | Juuz <6596629+Juuxel@users.noreply.github.com> | 2021-06-04 15:55:57 +0300 |
---|---|---|
committer | Juuz <6596629+Juuxel@users.noreply.github.com> | 2021-06-04 15:55:57 +0300 |
commit | fdaa5276124335b02ce5631197661f2aa90d165f (patch) | |
tree | 424094b458e07dafbb85f9f54855eeaff1a88562 | |
parent | 01537f7c5e29b7df4e3b6d8cef5880c8ac97a900 (diff) | |
download | LibGui-fdaa5276124335b02ce5631197661f2aa90d165f.tar.gz LibGui-fdaa5276124335b02ce5631197661f2aa90d165f.tar.bz2 LibGui-fdaa5276124335b02ce5631197661f2aa90d165f.zip |
Add test title to ScrollingTestGui
-rw-r--r-- | GuiTest/src/main/java/io/github/cottonmc/test/client/ScrollingTestGui.java | 5 |
1 files changed, 4 insertions, 1 deletions
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); } } |