diff options
Diffstat (limited to 'src/main/java/me/Danker/gui')
-rw-r--r-- | src/main/java/me/Danker/gui/DankerGui.java | 83 | ||||
-rw-r--r-- | src/main/java/me/Danker/gui/DisplayGui.java | 11 | ||||
-rw-r--r-- | src/main/java/me/Danker/gui/EditLocationsGui.java | 12 | ||||
-rw-r--r-- | src/main/java/me/Danker/gui/PuzzleSolversGui.java | 75 |
4 files changed, 154 insertions, 27 deletions
diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index 0ee10b9..15e0fa5 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -26,6 +26,7 @@ public class DankerGui extends GuiScreen { private GuiButton discordLink; private GuiButton changeDisplay; private GuiButton onlySlayer; + private GuiButton puzzleSolvers; // Toggles private GuiButton gparty; private GuiButton coords; @@ -44,6 +45,8 @@ public class DankerGui extends GuiScreen { private GuiButton expertiseLore; private GuiButton skill50Display; private GuiButton outlineText; + private GuiButton midasStaffMessages; + private GuiButton lividSolver; public DankerGui(int page) { this.page = page; @@ -72,50 +75,60 @@ public class DankerGui extends GuiScreen { // Page 1 changeDisplay = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Change Display Settings"); onlySlayer = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Set Slayer Quest"); - outlineText = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Outline Displayed Text: " + Utils.getColouredBoolean(ToggleCommand.outlineTextToggled)); - gparty = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Guild Party Notifications: " + Utils.getColouredBoolean(ToggleCommand.gpartyToggled)); - coords = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Coordinate/Angle Display: " + Utils.getColouredBoolean(ToggleCommand.coordsToggled)); - goldenEnch = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Golden T10/T6/T4 Enchantments: " + Utils.getColouredBoolean(ToggleCommand.goldenToggled)); - slayerCount = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Count Total 20% Drops: " + Utils.getColouredBoolean(ToggleCommand.slayerCountTotal)); + puzzleSolvers = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Toggle Dungeons Puzzle Solvers"); + outlineText = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Outline Displayed Text: " + Utils.getColouredBoolean(ToggleCommand.outlineTextToggled)); + splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); + dungeonTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Display Dungeon Timers: " + Utils.getColouredBoolean(ToggleCommand.dungeonTimerToggled)); + coords = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Coordinate/Angle Display: " + Utils.getColouredBoolean(ToggleCommand.coordsToggled)); // Page 2 - aotd = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Disable AOTD Ability: " + Utils.getColouredBoolean(ToggleCommand.aotdToggled)); - lividDagger = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Disable Livid Dagger Ability: " + Utils.getColouredBoolean(ToggleCommand.lividDaggerToggled)); - sceptreMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Enable Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages)); - petColours = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Colour Pet Backgrounds: " + Utils.getColouredBoolean(ToggleCommand.petColoursToggled)); - dungeonTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Display Dungeon Timers: " + Utils.getColouredBoolean(ToggleCommand.dungeonTimerToggled)); - golemAlerts = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Alert When Golem Spawns: " + Utils.getColouredBoolean(ToggleCommand.golemAlertToggled)); - expertiseLore = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Expertise Kills In Lore: " + Utils.getColouredBoolean(ToggleCommand.expertiseLoreToggled)); + gparty = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Guild Party Notifications: " + Utils.getColouredBoolean(ToggleCommand.gpartyToggled)); + goldenEnch = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Golden T10/T6/T4 Enchantments: " + Utils.getColouredBoolean(ToggleCommand.goldenToggled)); + slayerCount = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Count Total 20% Drops: " + Utils.getColouredBoolean(ToggleCommand.slayerCountTotal)); + chatMaddox = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Click Chat to Open Maddox: " + Utils.getColouredBoolean(ToggleCommand.chatMaddoxToggled)); + spiritBearAlert = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Spirit Bear Spawn Alerts: " + Utils.getColouredBoolean(ToggleCommand.spiritBearAlerts)); + aotd = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Disable AOTD Ability: " + Utils.getColouredBoolean(ToggleCommand.aotdToggled)); + lividDagger = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Disable Livid Dagger Ability: " + Utils.getColouredBoolean(ToggleCommand.lividDaggerToggled)); // Page 3 - skill50Display = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Display Progress To Skill Level 50: " + Utils.getColouredBoolean(ToggleCommand.skill50DisplayToggled)); + sceptreMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages)); + midasStaffMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Midas Staff Messages: " + Utils.getColouredBoolean(ToggleCommand.midasStaffMessages)); + petColours = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Colour Pet Backgrounds: " + Utils.getColouredBoolean(ToggleCommand.petColoursToggled)); + golemAlerts = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Alert When Golem Spawns: " + Utils.getColouredBoolean(ToggleCommand.golemAlertToggled)); + expertiseLore = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Expertise Kills In Lore: " + Utils.getColouredBoolean(ToggleCommand.expertiseLoreToggled)); + skill50Display = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Display Progress To Skill Level 50: " + Utils.getColouredBoolean(ToggleCommand.skill50DisplayToggled)); + lividSolver = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Find Correct Livid: " + Utils.getColouredBoolean(ToggleCommand.lividSolverToggled)); if (page == 1) { this.buttonList.add(changeDisplay); this.buttonList.add(onlySlayer); + this.buttonList.add(puzzleSolvers); this.buttonList.add(outlineText); - this.buttonList.add(gparty); + this.buttonList.add(splitFishing); + this.buttonList.add(dungeonTimer); this.buttonList.add(coords); - this.buttonList.add(goldenEnch); - this.buttonList.add(slayerCount); this.buttonList.add(nextPage); - this.buttonList.add(closeGUI); } else if (page == 2) { + this.buttonList.add(gparty); + this.buttonList.add(goldenEnch); + this.buttonList.add(slayerCount); + this.buttonList.add(chatMaddox); + this.buttonList.add(spiritBearAlert); this.buttonList.add(aotd); this.buttonList.add(lividDagger); + this.buttonList.add(nextPage); + this.buttonList.add(backPage); + } else if (page == 3) { this.buttonList.add(sceptreMessages); + this.buttonList.add(midasStaffMessages); this.buttonList.add(petColours); - this.buttonList.add(dungeonTimer); this.buttonList.add(golemAlerts); this.buttonList.add(expertiseLore); - this.buttonList.add(nextPage); - this.buttonList.add(backPage); - this.buttonList.add(closeGUI); - } else if (page == 3) { this.buttonList.add(skill50Display); + this.buttonList.add(lividSolver); this.buttonList.add(backPage); - this.buttonList.add(closeGUI); } this.buttonList.add(githubLink); this.buttonList.add(discordLink); + this.buttonList.add(closeGUI); } @Override @@ -148,6 +161,8 @@ public class DankerGui extends GuiScreen { TheMod.guiToOpen = "displaygui"; } else if (button == onlySlayer) { TheMod.guiToOpen = "onlyslayergui"; + } else if (button == puzzleSolvers) { + TheMod.guiToOpen = "puzzlesolvers"; } else if (button == outlineText) { ToggleCommand.outlineTextToggled = !ToggleCommand.outlineTextToggled; ConfigHandler.writeBooleanConfig("toggles", "OutlineText", ToggleCommand.outlineTextToggled); @@ -179,7 +194,7 @@ public class DankerGui extends GuiScreen { } else if (button == sceptreMessages) { ToggleCommand.sceptreMessages = !ToggleCommand.sceptreMessages; ConfigHandler.writeBooleanConfig("toggles", "SceptreMessages", ToggleCommand.sceptreMessages); - sceptreMessages.displayString = "Enable Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages); + sceptreMessages.displayString = "Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages); } else if (button == petColours) { ToggleCommand.petColoursToggled = !ToggleCommand.petColoursToggled; ConfigHandler.writeBooleanConfig("toggles", "PetColors", ToggleCommand.petColoursToggled); @@ -200,6 +215,26 @@ public class DankerGui extends GuiScreen { ToggleCommand.skill50DisplayToggled = !ToggleCommand.skill50DisplayToggled; ConfigHandler.writeBooleanConfig("toggles", "Skill50Display", ToggleCommand.skill50DisplayToggled); skill50Display.displayString = "Display Progress To Skill Level 50: " + Utils.getColouredBoolean(ToggleCommand.skill50DisplayToggled); + } else if (button == splitFishing) { + ToggleCommand.splitFishing = !ToggleCommand.splitFishing; + ConfigHandler.writeBooleanConfig("toggles", "SplitFishing", ToggleCommand.splitFishing); + splitFishing.displayString = "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing); + } else if (button == chatMaddox) { + ToggleCommand.chatMaddoxToggled = !ToggleCommand.chatMaddoxToggled; + ConfigHandler.writeBooleanConfig("toggles", "ChatMaddox", ToggleCommand.chatMaddoxToggled); + chatMaddox.displayString = "Click Chat to Open Maddox: " + Utils.getColouredBoolean(ToggleCommand.chatMaddoxToggled); + } else if (button == spiritBearAlert) { + ToggleCommand.spiritBearAlerts = !ToggleCommand.spiritBearAlerts; + ConfigHandler.writeBooleanConfig("toggles", "SpiritBearAlerts", ToggleCommand.spiritBearAlerts); + spiritBearAlert.displayString = "Spirit Bear Spawn Alerts: " + Utils.getColouredBoolean(ToggleCommand.spiritBearAlerts); + } else if (button == midasStaffMessages) { + ToggleCommand.midasStaffMessages = !ToggleCommand.midasStaffMessages; + ConfigHandler.writeBooleanConfig("toggles", "MidasStaffMessages", ToggleCommand.midasStaffMessages); + midasStaffMessages.displayString = "Midas Staff Messages: " + Utils.getColouredBoolean(ToggleCommand.midasStaffMessages); + } else if (button == lividSolver) { + ToggleCommand.lividSolverToggled = !ToggleCommand.lividSolverToggled; + ConfigHandler.writeBooleanConfig("toggles", "LividSolver", ToggleCommand.lividSolverToggled); + lividSolver.displayString = "Find Correct Livid: " + Utils.getColouredBoolean(ToggleCommand.lividSolverToggled); } } diff --git a/src/main/java/me/Danker/gui/DisplayGui.java b/src/main/java/me/Danker/gui/DisplayGui.java index 243bedb..9f00ed3 100644 --- a/src/main/java/me/Danker/gui/DisplayGui.java +++ b/src/main/java/me/Danker/gui/DisplayGui.java @@ -25,6 +25,7 @@ public class DisplayGui extends GuiScreen { private GuiButton fishing; private GuiButton fishingWinter; private GuiButton fishingFestival; + private GuiButton spookyFishing; private GuiButton catacombsF1; private GuiButton catacombsF2; private GuiButton catacombsF3; @@ -53,9 +54,10 @@ public class DisplayGui extends GuiScreen { zombie = new GuiButton(0, width / 2 - 190, (int) (height * 0.3), 110, 20, "Zombie"); spider = new GuiButton(0, width / 2 - 55, (int) (height * 0.3), 110, 20, "Spider"); wolf = new GuiButton(0, width / 2 + 75, (int) (height * 0.3), 110, 20, "Wolf"); - fishing = new GuiButton(0, width / 2 - 190, (int) (height * 0.4), 110, 20, "Fishing"); - fishingWinter = new GuiButton(0, width / 2 - 55, (int) (height * 0.4), 110, 20, "Fishing Winter"); - fishingFestival = new GuiButton(0, width / 2 + 75, (int) (height * 0.4), 110, 20, "Fishing Festival"); + fishing = new GuiButton(0, width / 2 - 230, (int) (height * 0.4), 100, 20, "Fishing"); + fishingWinter = new GuiButton(0, width / 2 - 110, (int) (height * 0.4), 100, 20, "Fishing Winter"); + fishingFestival = new GuiButton(0, width / 2 + 10, (int) (height * 0.4), 100, 20, "Fishing Festival"); + spookyFishing = new GuiButton(0, width / 2 + 130, (int) (height * 0.4), 100, 20, "Spooky Fishing"); catacombsF1 = new GuiButton(0, width / 2 - 145, (int) (height * 0.55), 50, 20, "F1"); catacombsF2 = new GuiButton(0, width / 2 - 85, (int) (height * 0.55), 50, 20, "F2"); catacombsF3 = new GuiButton(0, width / 2 - 25, (int) (height * 0.55), 50, 20, "F3"); @@ -72,6 +74,7 @@ public class DisplayGui extends GuiScreen { this.buttonList.add(fishing); this.buttonList.add(fishingWinter); this.buttonList.add(fishingFestival); + this.buttonList.add(spookyFishing); this.buttonList.add(catacombsF1); this.buttonList.add(catacombsF2); this.buttonList.add(catacombsF3); @@ -129,6 +132,8 @@ public class DisplayGui extends GuiScreen { setDisplay("fishing_winter", false); } else if (button == fishingFestival) { setDisplay("fishing_festival", false); + } else if (button == spookyFishing) { + setDisplay("spooky_fishing", false); } else if (button == catacombsF1) { setDisplay("catacombs_floor_one", false); } else if (button == catacombsF2) { diff --git a/src/main/java/me/Danker/gui/EditLocationsGui.java b/src/main/java/me/Danker/gui/EditLocationsGui.java index 8fbc4cb..f8b6712 100644 --- a/src/main/java/me/Danker/gui/EditLocationsGui.java +++ b/src/main/java/me/Danker/gui/EditLocationsGui.java @@ -19,6 +19,7 @@ public class EditLocationsGui extends GuiScreen { private LocationButton dungeonTimer; private LocationButton coords; private LocationButton skill50; + private LocationButton lividHP; @Override public boolean doesGuiPauseGame() { @@ -72,9 +73,11 @@ public class EditLocationsGui extends GuiScreen { dungeonTimer = new LocationButton(0, moc.dungeonTimerXY[0], moc.dungeonTimerXY[1], 113 * sc.dungeonTimerScale, 57 * sc.dungeonTimerScale, sc.dungeonTimerScale, dungeonTimerText, dungeonTimerNums, 80); coords = new LocationButton(0, moc.coordsXY[0], moc.coordsXY[1], 141 * sc.coordsScale, 12 * sc.coordsScale, sc.coordsScale, "74 / 14 / -26 (141.1 / 6.7)", null, null); skill50 = new LocationButton(0, moc.skill50XY[0], moc.skill50XY[1], 233 * sc.skill50Scale, 12 * sc.skill50Scale, sc.skill50Scale, EnumChatFormatting.AQUA + "+3.5 Farming (28,882,117.7/55,172,425) 52.34%", null, null); + lividHP = new LocationButton(0, moc.lividHpXY[0], moc.lividHpXY[1], 85 * sc.lividHpScale, 12 * sc.lividHpScale, sc.lividHpScale, EnumChatFormatting.WHITE + "﴾ Livid " + EnumChatFormatting.YELLOW + "6.9M" + EnumChatFormatting.RED + "❤ " + EnumChatFormatting.WHITE + "﴿", null, null); this.buttonList.add(coords); this.buttonList.add(dungeonTimer); + this.buttonList.add(lividHP); this.buttonList.add(display); this.buttonList.add(skill50); } @@ -111,6 +114,11 @@ public class EditLocationsGui extends GuiScreen { MoveCommand.skill50XY[1] += yMoved; skill50.xPosition = MoveCommand.skill50XY[0]; skill50.yPosition = MoveCommand.skill50XY[1]; + } else if (moving.equals("lividHP")) { + MoveCommand.lividHpXY[0] += xMoved; + MoveCommand.lividHpXY[1] += yMoved; + lividHP.xPosition = MoveCommand.lividHpXY[0]; + lividHP.yPosition = MoveCommand.lividHpXY[1]; } this.buttonList.clear(); initGui(); @@ -131,6 +139,8 @@ public class EditLocationsGui extends GuiScreen { moving = "coords"; } else if (button == skill50) { moving = "skill50"; + } else if (button == lividHP) { + moving = "lividHP"; } } } @@ -147,6 +157,8 @@ public class EditLocationsGui extends GuiScreen { ConfigHandler.writeIntConfig("locations", "dungeonTimerY", MoveCommand.dungeonTimerXY[1]); ConfigHandler.writeIntConfig("locations", "skill50X", MoveCommand.skill50XY[0]); ConfigHandler.writeIntConfig("locations", "skill50Y", MoveCommand.skill50XY[1]); + ConfigHandler.writeIntConfig("locations", "lividHpX", MoveCommand.lividHpXY[0]); + ConfigHandler.writeIntConfig("locations", "lividHpY", MoveCommand.lividHpXY[1]); } } 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..e2fa4ef --- /dev/null +++ b/src/main/java/me/Danker/gui/PuzzleSolversGui.java @@ -0,0 +1,75 @@ +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; + private GuiButton creeper; + + @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)); + creeper = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Creeper Solver : " + Utils.getColouredBoolean(ToggleCommand.creeperToggled)); + + this.buttonList.add(goBack); + this.buttonList.add(riddle); + this.buttonList.add(trivia); + this.buttonList.add(blaze); + this.buttonList.add(creeper); + } + + @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); + } else if (button == creeper) { + ToggleCommand.creeperToggled = !ToggleCommand.creeperToggled; + ConfigHandler.writeBooleanConfig("toggles", "CreeperPuzzle", ToggleCommand.creeperToggled); + creeper.displayString = "Creeper Solver: " + Utils.getColouredBoolean(ToggleCommand.creeperToggled); + } + } + +} |