aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/gui/DankerGui.java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-12-07 19:00:24 -0500
committerGitHub <noreply@github.com>2020-12-07 19:00:24 -0500
commit0bd7c6336f5866ea5513f85a3cedf5c48e375ab2 (patch)
treec28066f2d9f819f57c42d8911f1e0046f48cdf60 /src/main/java/me/Danker/gui/DankerGui.java
parent886402bdcd8d68e6d1076c86d53baab47070dd63 (diff)
parentc5e8044e39f784798000b64bbece05eae0282d86 (diff)
downloadSkyblockMod-1.8.4.tar.gz
SkyblockMod-1.8.4.tar.bz2
SkyblockMod-1.8.4.zip
1.8.4v1.8.4
Merge pull request #42 from bowser0000/development
Diffstat (limited to 'src/main/java/me/Danker/gui/DankerGui.java')
-rw-r--r--src/main/java/me/Danker/gui/DankerGui.java114
1 files changed, 69 insertions, 45 deletions
diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java
index 168f7c7..1c40dc4 100644
--- a/src/main/java/me/Danker/gui/DankerGui.java
+++ b/src/main/java/me/Danker/gui/DankerGui.java
@@ -1,11 +1,6 @@
package me.Danker.gui;
-import java.awt.Desktop;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import me.Danker.TheMod;
+import me.Danker.DankersSkyblockMod;
import me.Danker.commands.ToggleCommand;
import me.Danker.handlers.ConfigHandler;
import me.Danker.handlers.TextRenderer;
@@ -15,6 +10,11 @@ import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.ScaledResolution;
+import java.awt.*;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+
public class DankerGui extends GuiScreen {
private int page;
@@ -27,6 +27,7 @@ public class DankerGui extends GuiScreen {
private GuiButton changeDisplay;
private GuiButton onlySlayer;
private GuiButton puzzleSolvers;
+ private GuiButton experimentationTableSolvers;
private GuiButton skillTracker;
// Toggles
private GuiButton gparty;
@@ -40,17 +41,19 @@ public class DankerGui extends GuiScreen {
private GuiButton aotd;
private GuiButton lividDagger;
private GuiButton sceptreMessages;
+ private GuiButton midasStaffMessages;
+ private GuiButton implosionMessages;
+ private GuiButton healMessages;
private GuiButton petColours;
private GuiButton dungeonTimer;
private GuiButton golemAlerts;
private GuiButton expertiseLore;
private GuiButton skill50Display;
private GuiButton outlineText;
- private GuiButton midasStaffMessages;
- private GuiButton healMessages;
private GuiButton cakeTimer;
private GuiButton lowHealthNotify;
private GuiButton lividSolver;
+ private GuiButton stopSalvageStarred;
public DankerGui(int page) {
this.page = page;
@@ -80,72 +83,83 @@ public class DankerGui extends GuiScreen {
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");
puzzleSolvers = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Toggle Dungeons Puzzle Solvers");
- skillTracker = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Toggle Skill XP/Hour Tracking");
- outlineText = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Outline Displayed Text: " + Utils.getColouredBoolean(ToggleCommand.outlineTextToggled));
- splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing));
- coords = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Coordinate/Angle Display: " + Utils.getColouredBoolean(ToggleCommand.coordsToggled));
+ experimentationTableSolvers = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Toggle Experimentation Table Solvers");
+ skillTracker = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Toggle Skill XP/Hour Tracking");
+ outlineText = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Outline Displayed Text: " + Utils.getColouredBoolean(ToggleCommand.outlineTextToggled));
+ splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing));
// Page 2
- dungeonTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Display Dungeon Timers: " + Utils.getColouredBoolean(ToggleCommand.dungeonTimerToggled));
- cakeTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Cake Timer: " + Utils.getColouredBoolean(ToggleCommand.cakeTimerToggled));
- skill50Display = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Display Progress To Skill Level 50: " + Utils.getColouredBoolean(ToggleCommand.skill50DisplayToggled));
- slayerCount = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Count Total 20% Drops: " + Utils.getColouredBoolean(ToggleCommand.slayerCountTotal));
- chatMaddox = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Click On-Screen to Open Maddox: " + Utils.getColouredBoolean(ToggleCommand.chatMaddoxToggled));
+ coords = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Coordinate/Angle Display: " + Utils.getColouredBoolean(ToggleCommand.coordsToggled));
+ dungeonTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Display Dungeon Timers: " + Utils.getColouredBoolean(ToggleCommand.dungeonTimerToggled));
+ cakeTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Cake Timer: " + Utils.getColouredBoolean(ToggleCommand.cakeTimerToggled));
+ skill50Display = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Display Progress To Skill Level 50: " + Utils.getColouredBoolean(ToggleCommand.skill50DisplayToggled));
+ slayerCount = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Count Total 20% Drops: " + Utils.getColouredBoolean(ToggleCommand.slayerCountTotal));
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
- gparty = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Guild Party Notifications: " + Utils.getColouredBoolean(ToggleCommand.gpartyToggled));
- spiritBearAlert = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Spirit Bear Spawn Alerts: " + Utils.getColouredBoolean(ToggleCommand.spiritBearAlerts));
- sceptreMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages));
- midasStaffMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Midas Staff Messages: " + Utils.getColouredBoolean(ToggleCommand.midasStaffMessages));
- healMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Heal Messages: " + Utils.getColouredBoolean(ToggleCommand.healMessages));
- goldenEnch = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Golden T10/T6/T4 Enchantments: " + Utils.getColouredBoolean(ToggleCommand.goldenToggled));
- petColours = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Colour Pet Backgrounds: " + Utils.getColouredBoolean(ToggleCommand.petColoursToggled));
+ chatMaddox = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Click On-Screen to Open Maddox: " + Utils.getColouredBoolean(ToggleCommand.chatMaddoxToggled));
+ gparty = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Guild Party Notifications: " + Utils.getColouredBoolean(ToggleCommand.gpartyToggled));
+ spiritBearAlert = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Spirit Bear Spawn Alerts: " + Utils.getColouredBoolean(ToggleCommand.spiritBearAlerts));
+ sceptreMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages));
+ midasStaffMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Midas Staff Messages: " + Utils.getColouredBoolean(ToggleCommand.midasStaffMessages));
+ implosionMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Implosion Messages: " + Utils.getColouredBoolean(ToggleCommand.implosionMessages));
+ healMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Heal Messages: " + Utils.getColouredBoolean(ToggleCommand.healMessages));
// Page 4
- expertiseLore = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Expertise Kills In Lore: " + Utils.getColouredBoolean(ToggleCommand.expertiseLoreToggled));
- lividSolver = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Find Correct Livid: " + Utils.getColouredBoolean(ToggleCommand.lividSolverToggled));
- golemAlerts = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Alert When Golem Spawns: " + Utils.getColouredBoolean(ToggleCommand.golemAlertToggled));
- 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));
-
+ goldenEnch = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Golden T10/T6/T4 Enchantments: " + Utils.getColouredBoolean(ToggleCommand.goldenToggled));
+ petColours = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Colour Pet Backgrounds: " + Utils.getColouredBoolean(ToggleCommand.petColoursToggled));
+ expertiseLore = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Expertise Kills In Lore: " + Utils.getColouredBoolean(ToggleCommand.expertiseLoreToggled));
+ lividSolver = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Find Correct Livid: " + Utils.getColouredBoolean(ToggleCommand.lividSolverToggled));
+ golemAlerts = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Alert When Golem Spawns: " + Utils.getColouredBoolean(ToggleCommand.golemAlertToggled));
+ rngesusAlert = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "RNGesus Alerts: " + Utils.getColouredBoolean(ToggleCommand.rngesusAlerts));
+ lowHealthNotify = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Low Health Notifications: " + Utils.getColouredBoolean(ToggleCommand.lowHealthNotifyToggled));
+ // Page 5
+ stopSalvageStarred = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Stop Salvaging Starred Items: " + Utils.getColouredBoolean(ToggleCommand.stopSalvageStarredToggled));
+
switch (page) {
case 1:
this.buttonList.add(changeDisplay);
this.buttonList.add(onlySlayer);
this.buttonList.add(puzzleSolvers);
+ this.buttonList.add(experimentationTableSolvers);
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(coords);
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(chatMaddox);
this.buttonList.add(gparty);
this.buttonList.add(spiritBearAlert);
this.buttonList.add(sceptreMessages);
this.buttonList.add(midasStaffMessages);
+ this.buttonList.add(implosionMessages);
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(goldenEnch);
+ this.buttonList.add(petColours);
this.buttonList.add(expertiseLore);
this.buttonList.add(lividSolver);
this.buttonList.add(golemAlerts);
this.buttonList.add(rngesusAlert);
this.buttonList.add(lowHealthNotify);
+ this.buttonList.add(nextPage);
+ this.buttonList.add(backPage);
+ break;
+ case 5:
+ this.buttonList.add(stopSalvageStarred);
this.buttonList.add(backPage);
break;
}
@@ -158,7 +172,7 @@ public class DankerGui extends GuiScreen {
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
this.drawDefaultBackground();
- String pageText = "Page: " + page + "/4";
+ String pageText = "Page: " + page + "/5";
int pageWidth = mc.fontRendererObj.getStringWidth(pageText);
new TextRenderer(mc, pageText, width / 2 - pageWidth / 2, 10, 1D);
super.drawScreen(mouseX, mouseY, partialTicks);
@@ -169,29 +183,31 @@ public class DankerGui extends GuiScreen {
if (button == closeGUI) {
Minecraft.getMinecraft().thePlayer.closeScreen();
} else if (button == nextPage) {
- TheMod.guiToOpen = "dankergui" + (page + 1);
+ DankersSkyblockMod.guiToOpen = "dankergui" + (page + 1);
} else if (button == backPage) {
- TheMod.guiToOpen = "dankergui" + (page - 1);
+ DankersSkyblockMod.guiToOpen = "dankergui" + (page - 1);
} else if (button == githubLink) {
try {
Desktop.getDesktop().browse(new URI("https://github.com/bowser0000/SkyblockMod"));
} catch (IOException | URISyntaxException ex) {
- System.err.println(ex);
+ ex.printStackTrace();
}
} else if (button == discordLink) {
try {
Desktop.getDesktop().browse(new URI("https://discord.gg/QsEkNQS"));
} catch (IOException | URISyntaxException ex) {
- System.err.println(ex);
+ ex.printStackTrace();
}
} else if (button == changeDisplay) {
- TheMod.guiToOpen = "displaygui";
+ DankersSkyblockMod.guiToOpen = "displaygui";
} else if (button == onlySlayer) {
- TheMod.guiToOpen = "onlyslayergui";
- } else if (button == puzzleSolvers) {
- TheMod.guiToOpen = "puzzlesolvers";
- } else if (button == skillTracker) {
- TheMod.guiToOpen = "skilltracker";
+ DankersSkyblockMod.guiToOpen = "onlyslayergui";
+ } else if (button == puzzleSolvers) {
+ DankersSkyblockMod.guiToOpen = "puzzlesolvers";
+ } else if (button == experimentationTableSolvers) {
+ DankersSkyblockMod.guiToOpen = "experimentsolvers";
+ } else if (button == skillTracker) {
+ DankersSkyblockMod.guiToOpen = "skilltracker";
} else if (button == outlineText) {
ToggleCommand.outlineTextToggled = !ToggleCommand.outlineTextToggled;
ConfigHandler.writeBooleanConfig("toggles", "OutlineText", ToggleCommand.outlineTextToggled);
@@ -280,6 +296,14 @@ public class DankerGui extends GuiScreen {
ToggleCommand.lowHealthNotifyToggled = !ToggleCommand.lowHealthNotifyToggled;
ConfigHandler.writeBooleanConfig("toggles", "LowHealthNotify", ToggleCommand.lowHealthNotifyToggled);
lowHealthNotify.displayString = "Low Health Notifications: " + Utils.getColouredBoolean(ToggleCommand.lowHealthNotifyToggled);
+ } else if (button == implosionMessages) {
+ ToggleCommand.implosionMessages = !ToggleCommand.implosionMessages;
+ ConfigHandler.writeBooleanConfig("toggles", "ImplosionMessages", ToggleCommand.implosionMessages);
+ implosionMessages.displayString = "Implosion Messages: " + Utils.getColouredBoolean(ToggleCommand.implosionMessages);
+ } else if(button == stopSalvageStarred) {
+ ToggleCommand.stopSalvageStarredToggled = !ToggleCommand.stopSalvageStarredToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "StopSalvageStarred", ToggleCommand.stopSalvageStarredToggled);
+ stopSalvageStarred.displayString = "Stop Salvaging Starred Items: " + Utils.getColouredBoolean(ToggleCommand.stopSalvageStarredToggled);
}
}