Include gui and api inside jar
This commit is contained in:
@@ -6,6 +6,8 @@ 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.WSprite;
|
||||
import kaptainwutax.seedcracker.SeedCracker;
|
||||
import kaptainwutax.seedcracker.finder.FinderQueue;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.TranslatableText;
|
||||
import net.minecraft.util.Identifier;
|
||||
@@ -19,7 +21,15 @@ public class Gui extends LightweightGuiDescription {
|
||||
WSprite icon = new WSprite(new Identifier("minecraft:textures/item/redstone.png"));
|
||||
root.add(icon, 0, 2, 1, 1);
|
||||
|
||||
WButton button = new WButton(new TranslatableText("gui.examplemod.examplebutton"));
|
||||
WButton button = new WButton(new TranslatableText("RESET DATA"));
|
||||
button.setOnClick(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
SeedCracker.get().getDataStorage().clear();
|
||||
FinderQueue.get().clear();
|
||||
}
|
||||
}
|
||||
);
|
||||
root.add(button, 0, 3, 4, 1);
|
||||
|
||||
WLabel label = new WLabel(new LiteralText("Test"), 0xFFFFFF);
|
||||
@@ -29,7 +39,6 @@ public class Gui extends LightweightGuiDescription {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void addPainters() {
|
||||
getRootPanel().setBackgroundPainter(BackgroundPainter.VANILLA); //This is done automatically though
|
||||
|
||||
Reference in New Issue
Block a user