diff options
author | bowser0000 <bowser0000@gmail.com> | 2020-11-28 18:41:44 -0500 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2020-11-28 18:41:44 -0500 |
commit | 16de12d5ca1871c3de01fa2442ba9a8b9141401c (patch) | |
tree | dd82f406973344cbfb1b6bc103d49e4a205b382a /src/main/java/me/Danker/gui/PuzzleSolversGui.java | |
parent | 9592c4bcf0fd912b7ca5586977d47422b933d56e (diff) | |
download | SkyblockMod-16de12d5ca1871c3de01fa2442ba9a8b9141401c.tar.gz SkyblockMod-16de12d5ca1871c3de01fa2442ba9a8b9141401c.tar.bz2 SkyblockMod-16de12d5ca1871c3de01fa2442ba9a8b9141401c.zip |
Add F7 stage 3 arrow and 2 terminal puzzle solvers
Starts with letter terminal and select all colour terminal
Diffstat (limited to 'src/main/java/me/Danker/gui/PuzzleSolversGui.java')
-rw-r--r-- | src/main/java/me/Danker/gui/PuzzleSolversGui.java | 58 |
1 files changed, 52 insertions, 6 deletions
diff --git a/src/main/java/me/Danker/gui/PuzzleSolversGui.java b/src/main/java/me/Danker/gui/PuzzleSolversGui.java index ff4a911..8e08389 100644 --- a/src/main/java/me/Danker/gui/PuzzleSolversGui.java +++ b/src/main/java/me/Danker/gui/PuzzleSolversGui.java @@ -11,13 +11,24 @@ import net.minecraft.client.gui.ScaledResolution; public class PuzzleSolversGui extends GuiScreen { + private int page; + private GuiButton goBack; + private GuiButton backPage; + private GuiButton nextPage; private GuiButton riddle; private GuiButton trivia; private GuiButton blaze; private GuiButton onlyShowCorrectBlaze; private GuiButton creeper; private GuiButton water; + private GuiButton startsWith; + private GuiButton selectAll; + private GuiButton itemFrameOnSeaLanterns; + + public PuzzleSolversGui(int page) { + this.page = page; + } @Override public boolean doesGuiPauseGame() { @@ -33,20 +44,39 @@ public class PuzzleSolversGui extends GuiScreen { int width = sr.getScaledWidth(); goBack = new GuiButton(0, 2, height - 30, 100, 20, "Go Back"); + backPage = new GuiButton(0, width / 2 - 100, (int) (height * 0.8), 80, 20, "< Back"); + nextPage = new GuiButton(0, width / 2 + 20, (int) (height * 0.8), 80, 20, "Next >"); + + // Page 1 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)); onlyShowCorrectBlaze = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Only Show Correct Blaze Hitbox: " + Utils.getColouredBoolean(ToggleCommand.onlyShowCorrectBlazeToggled)); creeper = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Creeper Solver: " + Utils.getColouredBoolean(ToggleCommand.creeperToggled)); water = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Water Solver: " + Utils.getColouredBoolean(ToggleCommand.waterToggled)); + startsWith = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Starts With Letter Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.startsWithToggled)); + // Page 2 + selectAll = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Select All Color Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.selectAllToggled)); + itemFrameOnSeaLanterns = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Ignore Item Frames On Lanterns: " + Utils.getColouredBoolean(ToggleCommand.itemFrameOnSeaLanternsToggled)); + switch (page) { + case 1: + this.buttonList.add(riddle); + this.buttonList.add(trivia); + this.buttonList.add(blaze); + this.buttonList.add(onlyShowCorrectBlaze); + this.buttonList.add(creeper); + this.buttonList.add(water); + this.buttonList.add(startsWith); + this.buttonList.add(nextPage); + break; + case 2: + this.buttonList.add(selectAll); + this.buttonList.add(itemFrameOnSeaLanterns); + this.buttonList.add(backPage); + break; + } this.buttonList.add(goBack); - this.buttonList.add(riddle); - this.buttonList.add(trivia); - this.buttonList.add(blaze); - this.buttonList.add(onlyShowCorrectBlaze); - this.buttonList.add(creeper); - this.buttonList.add(water); } @Override @@ -59,6 +89,10 @@ public class PuzzleSolversGui extends GuiScreen { public void actionPerformed(GuiButton button) { if (button == goBack) { TheMod.guiToOpen = "dankergui1"; + } else if (button == backPage) { + Minecraft.getMinecraft().displayGuiScreen(new PuzzleSolversGui(page - 1)); + } else if (button == nextPage) { + Minecraft.getMinecraft().displayGuiScreen(new PuzzleSolversGui(page + 1)); } else if (button == riddle) { ToggleCommand.threeManToggled = !ToggleCommand.threeManToggled; ConfigHandler.writeBooleanConfig("toggles", "ThreeManPuzzle", ToggleCommand.threeManToggled); @@ -83,6 +117,18 @@ public class PuzzleSolversGui extends GuiScreen { ToggleCommand.waterToggled = !ToggleCommand.waterToggled; ConfigHandler.writeBooleanConfig("toggles", "WaterPuzzle", ToggleCommand.waterToggled); water.displayString = "Water Solver: " + Utils.getColouredBoolean(ToggleCommand.waterToggled); + } else if (button == startsWith) { + ToggleCommand.startsWithToggled = !ToggleCommand.startsWithToggled; + ConfigHandler.writeBooleanConfig("toggle", "StartsWithTerminal", ToggleCommand.startsWithToggled); + startsWith.displayString = "Starts With Letter Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.startsWithToggled); + } else if (button == selectAll) { + ToggleCommand.selectAllToggled = !ToggleCommand.selectAllToggled; + ConfigHandler.writeBooleanConfig("toggle", "SelectAllTerminal", ToggleCommand.selectAllToggled); + selectAll.displayString = "Select All Color Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.selectAllToggled); + } else if (button == itemFrameOnSeaLanterns) { + ToggleCommand.itemFrameOnSeaLanternsToggled = !ToggleCommand.itemFrameOnSeaLanternsToggled; + ConfigHandler.writeBooleanConfig("toggles", "IgnoreItemFrameOnSeaLanterns", ToggleCommand.itemFrameOnSeaLanternsToggled); + itemFrameOnSeaLanterns.displayString = "Ignore Item Frames On Lanterns: " + Utils.getColouredBoolean(ToggleCommand.itemFrameOnSeaLanternsToggled); } } |