From 167037e1caba94ac8572c447b2f6704da77ab921 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Tue, 16 Aug 2022 15:56:26 +0300 Subject: Improve look of the config screen Fixes #171. Also removed the test text field. --- .../cotton/gui/impl/modmenu/ConfigGui.java | 29 +++------------------- 1 file changed, 4 insertions(+), 25 deletions(-) (limited to 'src/main') diff --git a/src/main/java/io/github/cottonmc/cotton/gui/impl/modmenu/ConfigGui.java b/src/main/java/io/github/cottonmc/cotton/gui/impl/modmenu/ConfigGui.java index 1832313..85a7353 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/impl/modmenu/ConfigGui.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/impl/modmenu/ConfigGui.java @@ -10,14 +10,12 @@ import io.github.cottonmc.cotton.gui.client.LightweightGuiDescription; import io.github.cottonmc.cotton.gui.impl.client.LibGuiClient; import io.github.cottonmc.cotton.gui.widget.WButton; import io.github.cottonmc.cotton.gui.widget.WGridPanel; -import io.github.cottonmc.cotton.gui.widget.WTextField; import io.github.cottonmc.cotton.gui.widget.WToggleButton; import io.github.cottonmc.cotton.gui.widget.data.Insets; public class ConfigGui extends LightweightGuiDescription { - public ConfigGui(Screen previous) { - WGridPanel root = new WGridPanel(); + WGridPanel root = new WGridPanel(20); root.setInsets(Insets.ROOT_PANEL); setRootPanel(root); @@ -29,36 +27,17 @@ public class ConfigGui extends LightweightGuiDescription { } }; darkmodeButton.setToggle(LibGuiClient.config.darkMode); - root.add(darkmodeButton, 0, 2, 6, 1); - - WTextField testField = new WTextField(); - testField.setSuggestion(Text.literal("test")); - root.add(testField, 0, 3, 4, 1); - - /* - WSlider verticalSlider = new WSlider(-100, 100, Axis.VERTICAL); - verticalSlider.setDraggingFinishedListener(() -> System.out.println("Mouse released")); - verticalSlider.setValueChangeListener(System.out::println); - - WLabeledSlider horizontalSlider = new WLabeledSlider(0, 500); - horizontalSlider.setLabelUpdater(value -> new LiteralText(value + "!")); - horizontalSlider.setDraggingFinishedListener(() -> System.out.println("Mouse released")); - horizontalSlider.setValue(250); - - root.add(verticalSlider, 6, 0, 1, 3); - root.add(horizontalSlider, 1, 4, 4, 1); - */ + root.add(darkmodeButton, 0, 1, 6, 1); - root.add(new WKirbSprite(), 5, 4); + root.add(new WKirbSprite(), 5, 2); WButton doneButton = new WButton(ScreenTexts.DONE); doneButton.setOnClick(()->{ MinecraftClient.getInstance().setScreen(previous); }); - root.add(doneButton, 0, 5, 3, 1); + root.add(doneButton, 0, 3, 3, 1); root.setBackgroundPainter(BackgroundPainter.VANILLA); - root.setSize(7*18, 6*18); root.validate(this); } -- cgit