@@ -0,0 +1,1938 @@
+package net.earthcomputer.easyeditors.gui.command.slot;%0A%0Aimport java.util.List;%0A%0Aimport net.earthcomputer.easyeditors.gui.command.CommandSyntaxException;%0Aimport net.minecraft.client.Minecraft;%0Aimport net.minecraftforge.fml.client.config.GuiCheckBox;%0Aimport net.minecraftforge.fml.client.config.HoverChecker;%0A%0Apublic class CommandSlotCheckbox extends GuiCommandSlotImpl %7B%0A%0A%09private GuiCheckBox checkbox;%0A%09private String hoverText;%0A%09private HoverChecker hoverChecker;%0A%0A%09public CommandSlotCheckbox() %7B%0A%09%09this(null);%0A%09%7D%0A%0A%09public CommandSlotCheckbox(String text) %7B%0A%09%09this(text, null);%0A%09%7D%0A%0A%09public CommandSlotCheckbox(String text, String hoverText) %7B%0A%09%09super(text == null %7C%7C text.isEmpty() ? 11 : 13 + Minecraft.getMinecraft().fontRendererObj.getStringWidth(text),%0A%09%09%09%0911);%0A%09%09this.checkbox = new GuiCheckBox(0, 0, 0, text == null ? %22%22 : text, false);%0A%09%09if (hoverText != null)%0A%09%09%09this.hoverChecker = new HoverChecker(checkbox, 1000);%0A%09%09this.hoverText = hoverText;%0A%09%7D%0A%0A%09@Override%0A%09public int readFromArgs(String%5B%5D args, int index) throws CommandSyntaxException %7B%0A%09%09if (index %3E= args.length)%0A%09%09%09throw new CommandSyntaxException();%0A%09%09checkbox.setIsChecked(Boolean.parseBoolean(args%5Bindex%5D));%0A%09%09return 1;%0A%09%7D%0A%0A%09@Override%0A%09public void addArgs(List%3CString%3E args) %7B%0A%09%09args.add(String.valueOf(checkbox.isChecked()));%0A%09%7D%0A%0A%09@Override%0A%09public void draw(int x, int y, int mouseX, int mouseY, float partialTicks) %7B%0A%09%09checkbox.xPosition = x;%0A%09%09checkbox.yPosition = y;%0A%09%09checkbox.drawButton(Minecraft.getMinecraft(), mouseX, mouseY);%0A%0A%09%09if (hoverText != null && hoverChecker.checkHover(mouseX, mouseY))%0A%09%09%09drawTooltip(mouseX, mouseY, hoverText);%0A%09%7D%0A%0A%09@Override%0A%09public boolean onMouseClicked(int mouseX, int mouseY, int mouseButton) %7B%0A%09%09return checkbox.mousePressed(Minecraft.getMinecraft(), mouseX, mouseY);%0A%09%7D%0A%0A%09public boolean isChecked() %7B%0A%09%09return checkbox.isChecked();%0A%09%7D%0A%0A%09public void setChecked(boolean checked) %7B%0A%09%09checkbox.setIsChecked(checked);%0A%09%7D%0A%0A%7D%0A

Add checkbox command slots