aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuuz <6596629+Juuxel@users.noreply.github.com>2022-08-16 15:56:26 +0300
committerJuuz <6596629+Juuxel@users.noreply.github.com>2022-08-16 15:56:26 +0300
commit167037e1caba94ac8572c447b2f6704da77ab921 (patch)
tree5148c261a65c8d41182138478de0a813d21270c6
parentca5035e3a1a03e81714639b5f9b172f2ab8597d5 (diff)
downloadLibGui-167037e1caba94ac8572c447b2f6704da77ab921.tar.gz
LibGui-167037e1caba94ac8572c447b2f6704da77ab921.tar.bz2
LibGui-167037e1caba94ac8572c447b2f6704da77ab921.zip
Improve look of the config screen
Fixes #171. Also removed the test text field.
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/impl/modmenu/ConfigGui.java29
1 files changed, 4 insertions, 25 deletions
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);
}