diff options
author | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2021-01-31 16:46:03 +0200 |
---|---|---|
committer | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2021-01-31 16:46:03 +0200 |
commit | 10772b146ff6af263c9c073028f85d34477b5d08 (patch) | |
tree | 363a326392394312ba9d94cfd8b3e21bee4c55d8 /GuiTest/src | |
parent | 124eab73545d49b9a5188f09f7cb32714af49b1e (diff) | |
download | LibGui-10772b146ff6af263c9c073028f85d34477b5d08.tar.gz LibGui-10772b146ff6af263c9c073028f85d34477b5d08.tar.bz2 LibGui-10772b146ff6af263c9c073028f85d34477b5d08.zip |
Add panel layout insets
Diffstat (limited to 'GuiTest/src')
-rw-r--r-- | GuiTest/src/main/java/io/github/cottonmc/test/client/TestClientGui.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/client/TestClientGui.java b/GuiTest/src/main/java/io/github/cottonmc/test/client/TestClientGui.java index de8a06a..bdc47b3 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/client/TestClientGui.java +++ b/GuiTest/src/main/java/io/github/cottonmc/test/client/TestClientGui.java @@ -1,6 +1,11 @@ package io.github.cottonmc.test.client; -import io.github.cottonmc.cotton.gui.client.BackgroundPainter; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.text.LiteralText; +import net.minecraft.util.Identifier; + import io.github.cottonmc.cotton.gui.client.LightweightGuiDescription; import io.github.cottonmc.cotton.gui.client.ScreenDrawing; import io.github.cottonmc.cotton.gui.widget.TooltipBuilder; @@ -13,11 +18,7 @@ import io.github.cottonmc.cotton.gui.widget.WTiledSprite; import io.github.cottonmc.cotton.gui.widget.WWidget; import io.github.cottonmc.cotton.gui.widget.data.Axis; import io.github.cottonmc.cotton.gui.widget.data.Color; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.util.math.MatrixStack; -import net.minecraft.text.LiteralText; -import net.minecraft.util.Identifier; +import io.github.cottonmc.cotton.gui.widget.data.Insets; public class TestClientGui extends LightweightGuiDescription { //private static final Identifier PORTAL1 = new Identifier("libgui-test:portal.png"); @@ -29,6 +30,7 @@ public class TestClientGui extends LightweightGuiDescription { public TestClientGui() { WGridPanel root = new WGridPanel(22); + root.setInsets(Insets.ROOT_PANEL); this.setRootPanel(root); WLabel title = new WLabel(new LiteralText("Client Test Gui"), WLabel.DEFAULT_TEXT_COLOR) { private final WWidget tooltipWidget = new WSprite(new Identifier("minecraft", "textures/block/cobblestone.png")); |