From 10772b146ff6af263c9c073028f85d34477b5d08 Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Sun, 31 Jan 2021 16:46:03 +0200 Subject: Add panel layout insets --- .../java/io/github/cottonmc/test/client/TestClientGui.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'GuiTest/src') 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")); -- cgit