diff options
author | bowser0000 <bowser0000@gmail.com> | 2020-10-24 20:30:39 -0400 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2020-10-24 20:30:39 -0400 |
commit | 7296e488bfe96eeb1cc91bbaeb3411f43d1f4386 (patch) | |
tree | 56cbe00588c7b5374369deba6f4549c3b812ac5e /src/main/java/me/Danker/gui/PuzzleSolversGui.java | |
parent | b16461c764179cd318cbf04887167a6bcb14cf56 (diff) | |
download | SkyblockMod-7296e488bfe96eeb1cc91bbaeb3411f43d1f4386.tar.gz SkyblockMod-7296e488bfe96eeb1cc91bbaeb3411f43d1f4386.tar.bz2 SkyblockMod-7296e488bfe96eeb1cc91bbaeb3411f43d1f4386.zip |
Add riddle, trivia, blaze puzzle solvers
For the ChatTriggers haters
Diffstat (limited to 'src/main/java/me/Danker/gui/PuzzleSolversGui.java')
-rw-r--r-- | src/main/java/me/Danker/gui/PuzzleSolversGui.java | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/src/main/java/me/Danker/gui/PuzzleSolversGui.java b/src/main/java/me/Danker/gui/PuzzleSolversGui.java new file mode 100644 index 0000000..8fbc32e --- /dev/null +++ b/src/main/java/me/Danker/gui/PuzzleSolversGui.java @@ -0,0 +1,68 @@ +package me.Danker.gui; + +import me.Danker.TheMod; +import me.Danker.commands.ToggleCommand; +import me.Danker.handlers.ConfigHandler; +import me.Danker.utils.Utils; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.ScaledResolution; + +public class PuzzleSolversGui extends GuiScreen { + + private GuiButton goBack; + private GuiButton riddle; + private GuiButton trivia; + private GuiButton blaze; + + @Override + public boolean doesGuiPauseGame() { + return false; + } + + @Override + public void initGui() { + super.initGui(); + + ScaledResolution sr = new ScaledResolution(Minecraft.getMinecraft()); + int height = sr.getScaledHeight(); + int width = sr.getScaledWidth(); + + goBack = new GuiButton(0, 2, height - 30, 100, 20, "Go Back"); + riddle = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Riddle Solver: " + Utils.getColouredBoolean(ToggleCommand.threeManToggled)); + trivia = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Trivia Solver: " + Utils.getColouredBoolean(ToggleCommand.oruoToggled)); + blaze = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Blaze Solver: " + Utils.getColouredBoolean(ToggleCommand.blazeToggled)); + + this.buttonList.add(goBack); + this.buttonList.add(riddle); + this.buttonList.add(trivia); + this.buttonList.add(blaze); + } + + @Override + public void drawScreen(int mouseX, int mouseY, float partialTicks) { + this.drawDefaultBackground(); + super.drawScreen(mouseX, mouseY, partialTicks); + } + + @Override + public void actionPerformed(GuiButton button) { + if (button == goBack) { + TheMod.guiToOpen = "dankergui1"; + } else if (button == riddle) { + ToggleCommand.threeManToggled = !ToggleCommand.threeManToggled; + ConfigHandler.writeBooleanConfig("toggles", "ThreeManPuzzle", ToggleCommand.threeManToggled); + riddle.displayString = "Riddle Solver: " + Utils.getColouredBoolean(ToggleCommand.threeManToggled); + } else if (button == trivia) { + ToggleCommand.oruoToggled = !ToggleCommand.oruoToggled; + ConfigHandler.writeBooleanConfig("toggles", "OruoPuzzle", ToggleCommand.oruoToggled); + trivia.displayString = "Trivia Solver: " + Utils.getColouredBoolean(ToggleCommand.oruoToggled); + } else if (button == blaze) { + ToggleCommand.blazeToggled = !ToggleCommand.blazeToggled; + ConfigHandler.writeBooleanConfig("toggles", "BlazePuzzle", ToggleCommand.blazeToggled); + blaze.displayString = "Blaze Solver: " + Utils.getColouredBoolean(ToggleCommand.blazeToggled); + } + } + +} |