aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/me/Danker/gui')
-rw-r--r--src/main/java/me/Danker/gui/DankerGui.java77
-rw-r--r--src/main/java/me/Danker/gui/PuzzleSolversGui.java58
2 files changed, 93 insertions, 42 deletions
diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java
index f086e25..168f7c7 100644
--- a/src/main/java/me/Danker/gui/DankerGui.java
+++ b/src/main/java/me/Danker/gui/DankerGui.java
@@ -107,42 +107,47 @@ public class DankerGui extends GuiScreen {
rngesusAlert = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "RNGesus Alerts: " + Utils.getColouredBoolean(ToggleCommand.rngesusAlerts));
lowHealthNotify = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Low Health Notifications: " + Utils.getColouredBoolean(ToggleCommand.lowHealthNotifyToggled));
- if (page == 1) {
- this.buttonList.add(changeDisplay);
- this.buttonList.add(onlySlayer);
- this.buttonList.add(puzzleSolvers);
- this.buttonList.add(skillTracker);
- this.buttonList.add(outlineText);
- this.buttonList.add(splitFishing);
- this.buttonList.add(coords);
- this.buttonList.add(nextPage);
- } else if (page == 2) {
- this.buttonList.add(dungeonTimer);
- this.buttonList.add(cakeTimer);
- this.buttonList.add(skill50Display);
- this.buttonList.add(slayerCount);
- this.buttonList.add(chatMaddox);
- this.buttonList.add(aotd);
- this.buttonList.add(lividDagger);
- this.buttonList.add(nextPage);
- this.buttonList.add(backPage);
- } else if (page == 3) {
- this.buttonList.add(gparty);
- this.buttonList.add(spiritBearAlert);
- this.buttonList.add(sceptreMessages);
- this.buttonList.add(midasStaffMessages);
- this.buttonList.add(healMessages);
- this.buttonList.add(goldenEnch);
- this.buttonList.add(petColours);
- this.buttonList.add(nextPage);
- this.buttonList.add(backPage);
- } else if (page == 4) {
- this.buttonList.add(expertiseLore);
- this.buttonList.add(lividSolver);
- this.buttonList.add(golemAlerts);
- this.buttonList.add(rngesusAlert);
- this.buttonList.add(lowHealthNotify);
- this.buttonList.add(backPage);
+ switch (page) {
+ case 1:
+ this.buttonList.add(changeDisplay);
+ this.buttonList.add(onlySlayer);
+ this.buttonList.add(puzzleSolvers);
+ this.buttonList.add(skillTracker);
+ this.buttonList.add(outlineText);
+ this.buttonList.add(splitFishing);
+ this.buttonList.add(coords);
+ this.buttonList.add(nextPage);
+ break;
+ case 2:
+ this.buttonList.add(dungeonTimer);
+ this.buttonList.add(cakeTimer);
+ this.buttonList.add(skill50Display);
+ this.buttonList.add(slayerCount);
+ this.buttonList.add(chatMaddox);
+ this.buttonList.add(aotd);
+ this.buttonList.add(lividDagger);
+ this.buttonList.add(nextPage);
+ this.buttonList.add(backPage);
+ break;
+ case 3:
+ this.buttonList.add(gparty);
+ this.buttonList.add(spiritBearAlert);
+ this.buttonList.add(sceptreMessages);
+ this.buttonList.add(midasStaffMessages);
+ this.buttonList.add(healMessages);
+ this.buttonList.add(goldenEnch);
+ this.buttonList.add(petColours);
+ this.buttonList.add(nextPage);
+ this.buttonList.add(backPage);
+ break;
+ case 4:
+ this.buttonList.add(expertiseLore);
+ this.buttonList.add(lividSolver);
+ this.buttonList.add(golemAlerts);
+ this.buttonList.add(rngesusAlert);
+ this.buttonList.add(lowHealthNotify);
+ this.buttonList.add(backPage);
+ break;
}
this.buttonList.add(githubLink);
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);
}
}