aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/gui
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-11-26 16:10:11 -0500
committerGitHub <noreply@github.com>2020-11-26 16:10:11 -0500
commit016814851e46acdbc7a8fce44746eb67feef5905 (patch)
treeb39ca6496c233efe327dcdff0379f50b5cc6e243 /src/main/java/me/Danker/gui
parent292f5dde43c3e00b78e1d4e772ae336340b0a834 (diff)
parent16f1cd3c009184e8c8f5c75b9afae9ca531d2fee (diff)
downloadSkyblockMod-016814851e46acdbc7a8fce44746eb67feef5905.tar.gz
SkyblockMod-016814851e46acdbc7a8fce44746eb67feef5905.tar.bz2
SkyblockMod-016814851e46acdbc7a8fce44746eb67feef5905.zip
Merge pull request #30 from bowser0000/development
Diffstat (limited to 'src/main/java/me/Danker/gui')
-rw-r--r--src/main/java/me/Danker/gui/DankerGui.java86
-rw-r--r--src/main/java/me/Danker/gui/DisplayGui.java34
-rw-r--r--src/main/java/me/Danker/gui/EditLocationsGui.java53
-rw-r--r--src/main/java/me/Danker/gui/PuzzleSolversGui.java9
-rw-r--r--src/main/java/me/Danker/gui/SkillTrackerGui.java99
5 files changed, 237 insertions, 44 deletions
diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java
index 15e0fa5..f086e25 100644
--- a/src/main/java/me/Danker/gui/DankerGui.java
+++ b/src/main/java/me/Danker/gui/DankerGui.java
@@ -8,10 +8,10 @@ import java.net.URISyntaxException;
import me.Danker.TheMod;
import me.Danker.commands.ToggleCommand;
import me.Danker.handlers.ConfigHandler;
+import me.Danker.handlers.TextRenderer;
import me.Danker.utils.Utils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
-import net.minecraft.client.gui.GuiConfirmOpenLink;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.ScaledResolution;
@@ -27,6 +27,7 @@ public class DankerGui extends GuiScreen {
private GuiButton changeDisplay;
private GuiButton onlySlayer;
private GuiButton puzzleSolvers;
+ private GuiButton skillTracker;
// Toggles
private GuiButton gparty;
private GuiButton coords;
@@ -46,6 +47,9 @@ public class DankerGui extends GuiScreen {
private GuiButton skill50Display;
private GuiButton outlineText;
private GuiButton midasStaffMessages;
+ private GuiButton healMessages;
+ private GuiButton cakeTimer;
+ private GuiButton lowHealthNotify;
private GuiButton lividSolver;
public DankerGui(int page) {
@@ -76,56 +80,71 @@ 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");
- 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));
+ 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));
// Page 2
- 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));
+ 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));
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
- 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));
+ 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));
+ // 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));
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(dungeonTimer);
this.buttonList.add(coords);
this.buttonList.add(nextPage);
} else if (page == 2) {
- this.buttonList.add(gparty);
- this.buttonList.add(goldenEnch);
+ this.buttonList.add(dungeonTimer);
+ this.buttonList.add(cakeTimer);
+ this.buttonList.add(skill50Display);
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(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(golemAlerts);
+ this.buttonList.add(nextPage);
+ this.buttonList.add(backPage);
+ } else if (page == 4) {
this.buttonList.add(expertiseLore);
- this.buttonList.add(skill50Display);
this.buttonList.add(lividSolver);
+ this.buttonList.add(golemAlerts);
+ this.buttonList.add(rngesusAlert);
+ this.buttonList.add(lowHealthNotify);
this.buttonList.add(backPage);
}
+
this.buttonList.add(githubLink);
this.buttonList.add(discordLink);
this.buttonList.add(closeGUI);
@@ -134,6 +153,9 @@ public class DankerGui extends GuiScreen {
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
this.drawDefaultBackground();
+ String pageText = "Page: " + page + "/4";
+ int pageWidth = mc.fontRendererObj.getStringWidth(pageText);
+ new TextRenderer(mc, pageText, width / 2 - pageWidth / 2, 10, 1D);
super.drawScreen(mouseX, mouseY, partialTicks);
}
@@ -163,6 +185,8 @@ public class DankerGui extends GuiScreen {
TheMod.guiToOpen = "onlyslayergui";
} else if (button == puzzleSolvers) {
TheMod.guiToOpen = "puzzlesolvers";
+ } else if (button == skillTracker) {
+ TheMod.guiToOpen = "skilltracker";
} else if (button == outlineText) {
ToggleCommand.outlineTextToggled = !ToggleCommand.outlineTextToggled;
ConfigHandler.writeBooleanConfig("toggles", "OutlineText", ToggleCommand.outlineTextToggled);
@@ -222,7 +246,7 @@ public class DankerGui extends GuiScreen {
} 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);
+ chatMaddox.displayString = "Click On-Screen to Open Maddox: " + Utils.getColouredBoolean(ToggleCommand.chatMaddoxToggled);
} else if (button == spiritBearAlert) {
ToggleCommand.spiritBearAlerts = !ToggleCommand.spiritBearAlerts;
ConfigHandler.writeBooleanConfig("toggles", "SpiritBearAlerts", ToggleCommand.spiritBearAlerts);
@@ -235,6 +259,22 @@ public class DankerGui extends GuiScreen {
ToggleCommand.lividSolverToggled = !ToggleCommand.lividSolverToggled;
ConfigHandler.writeBooleanConfig("toggles", "LividSolver", ToggleCommand.lividSolverToggled);
lividSolver.displayString = "Find Correct Livid: " + Utils.getColouredBoolean(ToggleCommand.lividSolverToggled);
+ } else if (button == rngesusAlert) {
+ ToggleCommand.rngesusAlerts = !ToggleCommand.rngesusAlerts;
+ ConfigHandler.writeBooleanConfig("toggles", "RNGesusAlerts", ToggleCommand.rngesusAlerts);
+ rngesusAlert.displayString = "RNGesus Alerts: " + Utils.getColouredBoolean(ToggleCommand.rngesusAlerts);
+ } else if (button == cakeTimer) {
+ ToggleCommand.cakeTimerToggled = !ToggleCommand.cakeTimerToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "CakeTimer", ToggleCommand.cakeTimerToggled);
+ cakeTimer.displayString = "Cake Timer: " + Utils.getColouredBoolean(ToggleCommand.cakeTimerToggled);
+ } else if (button == healMessages) {
+ ToggleCommand.healMessages = !ToggleCommand.healMessages;
+ ConfigHandler.writeBooleanConfig("toggles", "HealMessages", ToggleCommand.healMessages);
+ healMessages.displayString = "Heal Messages: " + Utils.getColouredBoolean(ToggleCommand.healMessages);
+ } else if (button == lowHealthNotify) {
+ ToggleCommand.lowHealthNotifyToggled = !ToggleCommand.lowHealthNotifyToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "LowHealthNotify", ToggleCommand.lowHealthNotifyToggled);
+ lowHealthNotify.displayString = "Low Health Notifications: " + Utils.getColouredBoolean(ToggleCommand.lowHealthNotifyToggled);
}
}
diff --git a/src/main/java/me/Danker/gui/DisplayGui.java b/src/main/java/me/Danker/gui/DisplayGui.java
index 9f00ed3..0a5f805 100644
--- a/src/main/java/me/Danker/gui/DisplayGui.java
+++ b/src/main/java/me/Danker/gui/DisplayGui.java
@@ -25,13 +25,15 @@ public class DisplayGui extends GuiScreen {
private GuiButton fishing;
private GuiButton fishingWinter;
private GuiButton fishingFestival;
- private GuiButton spookyFishing;
+ private GuiButton fishingSpooky;
+ private GuiButton mythological;
private GuiButton catacombsF1;
private GuiButton catacombsF2;
private GuiButton catacombsF3;
private GuiButton catacombsF4;
private GuiButton catacombsF5;
private GuiButton catacombsF6;
+ private GuiButton catacombsF7;
@Override
public boolean doesGuiPauseGame() {
@@ -57,13 +59,15 @@ public class DisplayGui extends GuiScreen {
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");
- catacombsF4 = new GuiButton(0, width / 2 + 35, (int) (height * 0.55), 50, 20, "F4");
- catacombsF5 = new GuiButton(0, width / 2 + 95, (int) (height * 0.55), 50, 20, "F5");
- catacombsF6 = new GuiButton(0, width / 2 - 145, (int) (height * 0.63), 50, 20, "F6");
+ fishingSpooky = new GuiButton(0, width / 2 + 130, (int) (height * 0.4), 100, 20, "Fishing Spooky");
+ mythological = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), 200, 20, "Mythological");
+ catacombsF1 = new GuiButton(0, width / 2 - 205, (int) (height * 0.65), 50, 20, "F1");
+ catacombsF2 = new GuiButton(0, width / 2 - 145, (int) (height * 0.65), 50, 20, "F2");
+ catacombsF3 = new GuiButton(0, width / 2 - 85, (int) (height * 0.65), 50, 20, "F3");
+ catacombsF4 = new GuiButton(0, width / 2 - 25, (int) (height * 0.65), 50, 20, "F4");
+ catacombsF5 = new GuiButton(0, width / 2 + 35, (int) (height * 0.65), 50, 20, "F5");
+ catacombsF6 = new GuiButton(0, width / 2 + 95, (int) (height * 0.65), 50, 20, "F6");
+ catacombsF7 = new GuiButton(0, width / 2 + 155, (int) (height * 0.65), 50, 20, "F7");
this.buttonList.add(showSession);
this.buttonList.add(off);
@@ -74,13 +78,15 @@ public class DisplayGui extends GuiScreen {
this.buttonList.add(fishing);
this.buttonList.add(fishingWinter);
this.buttonList.add(fishingFestival);
- this.buttonList.add(spookyFishing);
+ this.buttonList.add(fishingSpooky);
+ this.buttonList.add(mythological);
this.buttonList.add(catacombsF1);
this.buttonList.add(catacombsF2);
this.buttonList.add(catacombsF3);
this.buttonList.add(catacombsF4);
this.buttonList.add(catacombsF5);
this.buttonList.add(catacombsF6);
+ this.buttonList.add(catacombsF7);
this.buttonList.add(editLocations);
this.buttonList.add(goBack);
}
@@ -101,7 +107,7 @@ public class DisplayGui extends GuiScreen {
String catacombsTitleText = "Catacombs Dungeon";
int catacombsTitleWidth = mc.fontRendererObj.getStringWidth(catacombsTitleText);
- new TextRenderer(mc, catacombsTitleText, width / 2 - catacombsTitleWidth / 2, (int) (height * 0.5), 1D);
+ new TextRenderer(mc, catacombsTitleText, width / 2 - catacombsTitleWidth / 2, (int) (height * 0.6), 1D);
super.drawScreen(mouseX, mouseY, partialTicks);
}
@@ -132,8 +138,10 @@ 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 == fishingSpooky) {
+ setDisplay("fishing_spooky", false);
+ } else if (button == mythological) {
+ setDisplay("mythological", false);
} else if (button == catacombsF1) {
setDisplay("catacombs_floor_one", false);
} else if (button == catacombsF2) {
@@ -146,6 +154,8 @@ public class DisplayGui extends GuiScreen {
setDisplay("catacombs_floor_five", false);
} else if (button == catacombsF6) {
setDisplay("catacombs_floor_six", false);
+ } else if (button == catacombsF7) {
+ setDisplay("catacombs_floor_seven", false);
}
}
diff --git a/src/main/java/me/Danker/gui/EditLocationsGui.java b/src/main/java/me/Danker/gui/EditLocationsGui.java
index f8b6712..75caf6a 100644
--- a/src/main/java/me/Danker/gui/EditLocationsGui.java
+++ b/src/main/java/me/Danker/gui/EditLocationsGui.java
@@ -1,10 +1,14 @@
package me.Danker.gui;
+import org.lwjgl.opengl.GL11;
+
+import me.Danker.TheMod;
import me.Danker.commands.MoveCommand;
import me.Danker.commands.ScaleCommand;
import me.Danker.gui.buttons.LocationButton;
import me.Danker.handlers.ConfigHandler;
import me.Danker.utils.Utils;
+import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.util.EnumChatFormatting;
@@ -20,6 +24,8 @@ public class EditLocationsGui extends GuiScreen {
private LocationButton coords;
private LocationButton skill50;
private LocationButton lividHP;
+ private LocationButton cakeTimer;
+ private LocationButton skillTracker;
@Override
public boolean doesGuiPauseGame() {
@@ -29,9 +35,6 @@ public class EditLocationsGui extends GuiScreen {
@Override
public void initGui() {
super.initGui();
- // Ease of typing
- MoveCommand moc = new MoveCommand();
- ScaleCommand sc = new ScaleCommand();
String displayText = EnumChatFormatting.GOLD + "Svens Killed:\n" +
EnumChatFormatting.GREEN + "Wolf Teeth:\n" +
@@ -69,15 +72,23 @@ public class EditLocationsGui extends GuiScreen {
EnumChatFormatting.YELLOW + 2 + "\n" +
EnumChatFormatting.YELLOW + 1;
- display = new LocationButton(0, moc.displayXY[0], moc.displayXY[1], 145 * sc.displayScale, 102 * sc.displayScale, sc.displayScale, displayText, displayNums, 110);
- 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);
+ String skillTrackerText = TheMod.SKILL_TRACKER_COLOUR + "Farming XP Earned: 462,425.3\n" +
+ TheMod.SKILL_TRACKER_COLOUR + "Time Elapsed: " + Utils.getTimeBetween(0, 3602) + "\n" +
+ TheMod.SKILL_TRACKER_COLOUR + "XP Per Hour: 462,168";
+
+ display = new LocationButton(0, MoveCommand.displayXY[0], MoveCommand.displayXY[1], 145 * ScaleCommand.displayScale, 102 * ScaleCommand.displayScale, ScaleCommand.displayScale, displayText, displayNums, 110);
+ dungeonTimer = new LocationButton(0, MoveCommand.dungeonTimerXY[0], MoveCommand.dungeonTimerXY[1], 113 * ScaleCommand.dungeonTimerScale, 57 * ScaleCommand.dungeonTimerScale, ScaleCommand.dungeonTimerScale, dungeonTimerText, dungeonTimerNums, 80);
+ coords = new LocationButton(0, MoveCommand.coordsXY[0], MoveCommand.coordsXY[1], 141 * ScaleCommand.coordsScale, 12 * ScaleCommand.coordsScale, ScaleCommand.coordsScale, TheMod.COORDS_COLOUR + "74 / 14 / -26 (141.1 / 6.7)", null, null);
+ skill50 = new LocationButton(0, MoveCommand.skill50XY[0], MoveCommand.skill50XY[1], 233 * ScaleCommand.skill50Scale, 12 * ScaleCommand.skill50Scale, ScaleCommand.skill50Scale, TheMod.SKILL_50_COLOUR + "+3.5 Farming (28,882,117.7/55,172,425) 52.34%", null, null);
+ lividHP = new LocationButton(0, MoveCommand.lividHpXY[0], MoveCommand.lividHpXY[1], 85 * ScaleCommand.lividHpScale, 12 * ScaleCommand.lividHpScale, ScaleCommand.lividHpScale, EnumChatFormatting.WHITE + "﴾ Livid " + EnumChatFormatting.YELLOW + "6.9M" + EnumChatFormatting.RED + "❤ " + EnumChatFormatting.WHITE + "﴿", null, null);
+ cakeTimer = new LocationButton(0, MoveCommand.cakeTimerXY[0], MoveCommand.cakeTimerXY[1] + 5, 85 * ScaleCommand.cakeTimerScale, 18 * ScaleCommand.cakeTimerScale, ScaleCommand.cakeTimerScale, TheMod.CAKE_COLOUR + " 11h16m", null, null);
+ skillTracker = new LocationButton(0, MoveCommand.skillTrackerXY[0], MoveCommand.skillTrackerXY[1], 150 * ScaleCommand.skillTrackerScale, 28 * ScaleCommand.skillTrackerScale, ScaleCommand.skillTrackerScale, skillTrackerText, null, null);
this.buttonList.add(coords);
this.buttonList.add(dungeonTimer);
this.buttonList.add(lividHP);
+ this.buttonList.add(cakeTimer);
+ this.buttonList.add(skillTracker);
this.buttonList.add(display);
this.buttonList.add(skill50);
}
@@ -86,6 +97,14 @@ public class EditLocationsGui extends GuiScreen {
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
this.drawDefaultBackground();
mouseMoved(mouseX, mouseY);
+
+ double scale = ScaleCommand.cakeTimerScale;
+ double scaleReset = (double) Math.pow(scale, -1);
+ GL11.glScaled(scale, scale, scale);
+ mc.getTextureManager().bindTexture(TheMod.CAKE_ICON);
+ Gui.drawModalRectWithCustomSizedTexture(MoveCommand.cakeTimerXY[0], MoveCommand.cakeTimerXY[1], 0, 0, 16, 16, 16, 16);
+ GL11.glScaled(scaleReset, scaleReset, scaleReset);
+
super.drawScreen(mouseX, mouseY, partialTicks);
}
@@ -119,6 +138,16 @@ public class EditLocationsGui extends GuiScreen {
MoveCommand.lividHpXY[1] += yMoved;
lividHP.xPosition = MoveCommand.lividHpXY[0];
lividHP.yPosition = MoveCommand.lividHpXY[1];
+ } else if (moving.equals("cakeTimer")) {
+ MoveCommand.cakeTimerXY[0] += xMoved;
+ MoveCommand.cakeTimerXY[1] += yMoved;
+ cakeTimer.xPosition = MoveCommand.cakeTimerXY[0];
+ cakeTimer.yPosition = MoveCommand.cakeTimerXY[1];
+ } else if (moving.equals("skillTracker")) {
+ MoveCommand.skillTrackerXY[0] += xMoved;
+ MoveCommand.skillTrackerXY[1] += yMoved;
+ skillTracker.xPosition = MoveCommand.skillTrackerXY[0];
+ skillTracker.yPosition = MoveCommand.skillTrackerXY[1];
}
this.buttonList.clear();
initGui();
@@ -141,6 +170,10 @@ public class EditLocationsGui extends GuiScreen {
moving = "skill50";
} else if (button == lividHP) {
moving = "lividHP";
+ } else if (button == cakeTimer) {
+ moving = "cakeTimer";
+ } else if (button == skillTracker) {
+ moving = "skillTracker";
}
}
}
@@ -159,6 +192,10 @@ public class EditLocationsGui extends GuiScreen {
ConfigHandler.writeIntConfig("locations", "skill50Y", MoveCommand.skill50XY[1]);
ConfigHandler.writeIntConfig("locations", "lividHpX", MoveCommand.lividHpXY[0]);
ConfigHandler.writeIntConfig("locations", "lividHpY", MoveCommand.lividHpXY[1]);
+ ConfigHandler.writeIntConfig("locations", "cakeTimerX", MoveCommand.cakeTimerXY[0]);
+ ConfigHandler.writeIntConfig("locations", "cakeTimerY", MoveCommand.cakeTimerXY[1]);
+ ConfigHandler.writeIntConfig("locations", "skillTrackerX", MoveCommand.skillTrackerXY[0]);
+ ConfigHandler.writeIntConfig("locations", "skillTrackerY", MoveCommand.skillTrackerXY[1]);
}
}
diff --git a/src/main/java/me/Danker/gui/PuzzleSolversGui.java b/src/main/java/me/Danker/gui/PuzzleSolversGui.java
index e2fa4ef..4ae97bb 100644
--- a/src/main/java/me/Danker/gui/PuzzleSolversGui.java
+++ b/src/main/java/me/Danker/gui/PuzzleSolversGui.java
@@ -16,6 +16,7 @@ public class PuzzleSolversGui extends GuiScreen {
private GuiButton trivia;
private GuiButton blaze;
private GuiButton creeper;
+ private GuiButton water;
@Override
public boolean doesGuiPauseGame() {
@@ -34,13 +35,15 @@ public class PuzzleSolversGui extends GuiScreen {
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));
+ creeper = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Creeper Solver: " + Utils.getColouredBoolean(ToggleCommand.creeperToggled));
+ water = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Water Solver: " + Utils.getColouredBoolean(ToggleCommand.waterToggled));
this.buttonList.add(goBack);
this.buttonList.add(riddle);
this.buttonList.add(trivia);
this.buttonList.add(blaze);
this.buttonList.add(creeper);
+ this.buttonList.add(water);
}
@Override
@@ -69,6 +72,10 @@ public class PuzzleSolversGui extends GuiScreen {
ToggleCommand.creeperToggled = !ToggleCommand.creeperToggled;
ConfigHandler.writeBooleanConfig("toggles", "CreeperPuzzle", ToggleCommand.creeperToggled);
creeper.displayString = "Creeper Solver: " + Utils.getColouredBoolean(ToggleCommand.creeperToggled);
+ } else if (button == water) {
+ ToggleCommand.waterToggled = !ToggleCommand.waterToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "WaterPuzzle", ToggleCommand.waterToggled);
+ water.displayString = "Water Solver: " + Utils.getColouredBoolean(ToggleCommand.waterToggled);
}
}
diff --git a/src/main/java/me/Danker/gui/SkillTrackerGui.java b/src/main/java/me/Danker/gui/SkillTrackerGui.java
new file mode 100644
index 0000000..9672890
--- /dev/null
+++ b/src/main/java/me/Danker/gui/SkillTrackerGui.java
@@ -0,0 +1,99 @@
+package me.Danker.gui;
+
+import org.apache.commons.lang3.time.StopWatch;
+
+import me.Danker.TheMod;
+import me.Danker.handlers.ConfigHandler;
+import me.Danker.handlers.TextRenderer;
+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 SkillTrackerGui extends GuiScreen {
+
+ private GuiButton goBack;
+ private GuiButton start;
+ private GuiButton stop;
+ private GuiButton reset;
+ private GuiButton hide;
+ private GuiButton show;
+
+ @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");
+ start = new GuiButton(0, width / 2 - 140, (int) (height * 0.45), 80, 20, "Start");
+ stop = new GuiButton(0, width / 2 - 40, (int) (height * 0.45), 80, 20, "Stop");
+ reset = new GuiButton(0, width / 2 + 60, (int) (height * 0.45), 80, 20, "Reset");
+ hide = new GuiButton(0, width / 2 - 70, (int) (height * 0.55), 60, 20, "Hide");
+ show = new GuiButton(0, width / 2 + 10, (int) (height * 0.55), 60, 20, "Show");
+
+ this.buttonList.add(start);
+ this.buttonList.add(stop);
+ this.buttonList.add(reset);
+ this.buttonList.add(hide);
+ this.buttonList.add(show);
+ this.buttonList.add(goBack);
+ }
+
+ @Override
+ public void drawScreen(int mouseX, int mouseY, float partialTicks) {
+ this.drawDefaultBackground();
+ String stateText = "";
+ if (TheMod.skillStopwatch.isStarted() && !TheMod.skillStopwatch.isSuspended()) {
+ stateText = "Timer: Running";
+ } else if (!TheMod.skillStopwatch.isStarted() || TheMod.skillStopwatch.isSuspended()) {
+ stateText = "Timer: Paused";
+ }
+ if (!TheMod.showSkillTracker) {
+ stateText += " (Hidden)";
+ }
+ int stateTextWidth = mc.fontRendererObj.getStringWidth(stateText);
+ new TextRenderer(mc, stateText, width / 2 - stateTextWidth / 2, 10, 1D);
+ super.drawScreen(mouseX, mouseY, partialTicks);
+ }
+
+ @Override
+ public void actionPerformed(GuiButton button) {
+ if (button == goBack) {
+ TheMod.guiToOpen = "dankergui1";
+ } else if (button == start) {
+ if (TheMod.skillStopwatch.isStarted() && TheMod.skillStopwatch.isSuspended()) {
+ TheMod.skillStopwatch.resume();
+ } else if (!TheMod.skillStopwatch.isStarted()) {
+ TheMod.skillStopwatch.start();
+ }
+ } else if (button == stop) {
+ if (TheMod.skillStopwatch.isStarted() && !TheMod.skillStopwatch.isSuspended()) {
+ TheMod.skillStopwatch.suspend();
+ }
+ } else if (button == reset) {
+ TheMod.skillStopwatch = new StopWatch();
+ TheMod.farmingXPGained = 0;
+ TheMod.miningXPGained = 0;
+ TheMod.combatXPGained = 0;
+ TheMod.foragingXPGained = 0;
+ TheMod.fishingXPGained = 0;
+ TheMod.enchantingXPGained = 0;
+ TheMod.alchemyXPGained = 0;
+ } else if (button == hide) {
+ TheMod.showSkillTracker = false;
+ ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", false);
+ } else if (button == show) {
+ TheMod.showSkillTracker = true;
+ ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", true);
+ }
+ }
+
+}