42 lines
1.5 KiB
Java
42 lines
1.5 KiB
Java
package de.nicolasklier.custom_structures.guis;
|
|
|
|
import io.github.cottonmc.cotton.gui.client.LightweightGuiDescription;
|
|
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.WSlider;
|
|
import io.github.cottonmc.cotton.gui.widget.WSprite;
|
|
import io.github.cottonmc.cotton.gui.widget.data.Axis;
|
|
import io.github.cottonmc.cotton.gui.widget.data.Insets;
|
|
import net.minecraft.client.gui.hud.MessageIndicator.Icon;
|
|
import net.minecraft.text.Text;
|
|
import net.minecraft.util.Identifier;
|
|
|
|
public class SettingsGui extends LightweightGuiDescription {
|
|
|
|
public SettingsGui() {
|
|
WGridPanel root = new WGridPanel();
|
|
setRootPanel(root);
|
|
root.setSize(256, 240);
|
|
root.setInsets(Insets.ROOT_PANEL);
|
|
|
|
WLabel title = new WLabel(Text.of("Custom Structures"), 0x000000);
|
|
root.add(title, 0, 0, 2, 1);
|
|
|
|
//WSprite icon = new WSprite(new Identifier("minecraft:textures/item/redstone.png"));
|
|
//root.add(icon, 0, 2, 1, 1);
|
|
|
|
WLabel label_width = new WLabel(Text.of("Width"), 0x000000);
|
|
root.add(label_width , 0, 2, 2, 1);
|
|
|
|
WSlider slider = new WSlider(0, 100, Axis.HORIZONTAL);
|
|
root.add(slider, 0, 4, 5, 1);
|
|
|
|
WButton button = new WButton(Text.of("Save"));
|
|
root.add(button, 0, 10, 4, 1);
|
|
|
|
root.validate(this);
|
|
|
|
}
|
|
}
|