aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/config
diff options
context:
space:
mode:
authorLorenz <ESs95s3P5z8Pheb>2022-07-08 12:06:49 +0200
committerLorenz <ESs95s3P5z8Pheb>2022-07-08 12:06:49 +0200
commitc167f4e84e22da7b7c4405b5d59c817734654fc0 (patch)
tree5f934dbf5d577aa1c91ee697a06a67b0bb36dd23 /src/main/java/com/thatgravyboat/skyblockhud/config
parenta2087e9a2fa43e13e4276b81ac7235f441a5c28d (diff)
downloadskyhanni-c167f4e84e22da7b7c4405b5d59c817734654fc0.tar.gz
skyhanni-c167f4e84e22da7b7c4405b5d59c817734654fc0.tar.bz2
skyhanni-c167f4e84e22da7b7c4405b5d59c817734654fc0.zip
start with custom config
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/config')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java144
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfigEditor.java8
2 files changed, 87 insertions, 65 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java b/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java
index 8793fb8ec..08e72d40d 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java
@@ -20,55 +20,59 @@ public class SBHConfig extends Config {
@Override
public void executeRunnable(String runnableId) {
- String activeConfigCategory = null;
- if (Minecraft.getMinecraft().currentScreen instanceof GuiScreenElementWrapper) {
- GuiScreenElementWrapper wrapper = (GuiScreenElementWrapper) Minecraft.getMinecraft().currentScreen;
- if (wrapper.element instanceof SBHConfigEditor) {
- activeConfigCategory = ((SBHConfigEditor) wrapper.element).getSelectedCategoryName();
- }
- }
-
- switch (runnableId) {
- case "rpg":
- editOverlay(activeConfigCategory, 120, 47, rpg.rpgHudPosition);
- return;
- case "d1":
- editOverlay(activeConfigCategory, 120, 32, dungeon.dungeonPlayer1);
- return;
- case "d2":
- editOverlay(activeConfigCategory, 120, 32, dungeon.dungeonPlayer2);
- return;
- case "d3":
- editOverlay(activeConfigCategory, 120, 32, dungeon.dungeonPlayer3);
- return;
- case "d4":
- editOverlay(activeConfigCategory, 120, 32, dungeon.dungeonPlayer4);
- return;
- case "main":
- editOverlay(activeConfigCategory, 1000, 34, main.mainHudPos);
- return;
- case "ultimate":
- editOverlay(activeConfigCategory, 182, 5, dungeon.barPosition);
- return;
- case "map":
- editOverlay(activeConfigCategory, 72, 72, map.miniMapPosition);
- return;
- case "tracker":
- editOverlay(activeConfigCategory, 130, 70, trackers.trackerPosition);
- return;
- case "drill":
- editOverlay(activeConfigCategory, 136, 7, mining.drillBar);
- return;
- case "heat":
- editOverlay(activeConfigCategory, 45, 7, mining.heatBar);
- return;
- case "dialogue":
- editOverlay(activeConfigCategory, 182, 68, misc.dialoguePos);
- return;
- }
+// String activeConfigCategory = null;
+// if (Minecraft.getMinecraft().currentScreen instanceof GuiScreenElementWrapper) {
+// GuiScreenElementWrapper wrapper = (GuiScreenElementWrapper) Minecraft.getMinecraft().currentScreen;
+// if (wrapper.element instanceof SBHConfigEditor) {
+// activeConfigCategory = ((SBHConfigEditor) wrapper.element).getSelectedCategoryName();
+// }
+// }
+//
+// switch (runnableId) {
+// case "rpg":
+// editOverlay(activeConfigCategory, 120, 47, rpg.rpgHudPosition);
+// return;
+// case "d1":
+// editOverlay(activeConfigCategory, 120, 32, dungeon.dungeonPlayer1);
+// return;
+// case "d2":
+// editOverlay(activeConfigCategory, 120, 32, dungeon.dungeonPlayer2);
+// return;
+// case "d3":
+// editOverlay(activeConfigCategory, 120, 32, dungeon.dungeonPlayer3);
+// return;
+// case "d4":
+// editOverlay(activeConfigCategory, 120, 32, dungeon.dungeonPlayer4);
+// return;
+// case "main":
+// editOverlay(activeConfigCategory, 1000, 34, main.mainHudPos);
+// return;
+// case "ultimate":
+// editOverlay(activeConfigCategory, 182, 5, dungeon.barPosition);
+// return;
+// case "map":
+// editOverlay(activeConfigCategory, 72, 72, map.miniMapPosition);
+// return;
+// case "tracker":
+// editOverlay(activeConfigCategory, 130, 70, trackers.trackerPosition);
+// return;
+// case "drill":
+// editOverlay(activeConfigCategory, 136, 7, mining.drillBar);
+// return;
+// case "heat":
+// editOverlay(activeConfigCategory, 45, 7, mining.heatBar);
+// return;
+// case "dialogue":
+// editOverlay(activeConfigCategory, 182, 68, misc.dialoguePos);
+// return;
+// }
}
@Expose
+ @Category(name = "Lorenz Options", desc = "Just a test by lorenz.")
+ public Lorenz lorenz = new Lorenz();
+
+ @Expose
@Category(name = "Misc Options", desc = "Just a bunch of random options.")
public Misc misc = new Misc();
@@ -96,9 +100,27 @@ public class SBHConfig extends Config {
@Category(name = "Mining", desc = "All Options for the Mining Stuff.")
public Mining mining = new Mining();
- @Expose
- @Category(name = "Tracker", desc = "All Options for the Trackers.")
- public Trackers trackers = new Trackers();
+// @Expose
+// @Category(name = "Tracker", desc = "All Options for the Trackers.")
+// public Trackers trackers = new Trackers();
+
+ public static class Lorenz {
+
+ @Expose
+ @ConfigOption(name = "Lorenz Small Test A", desc = "abc")
+ @ConfigEditorBoolean
+ public boolean test = false;
+
+ @Expose
+ @ConfigOption(name = "Lorenz Small Test B", desc = "def")
+ @ConfigEditorBoolean
+ public boolean test2 = false;
+
+ @Expose
+ @ConfigOption(name = "Lorenz Small Test C", desc = "ghi")
+ @ConfigEditorBoolean
+ public boolean test3 = false;
+ }
public static class Misc {
@@ -421,16 +443,16 @@ public class SBHConfig extends Config {
public int chatWaypointMode = 1;
}
- public static class Trackers {
-
- @Expose
- @ConfigOption(name = "Tracker Position", desc = "Allows you to change the position of the Trackers.")
- @ConfigEditorButton(runnableId = "tracker", buttonText = "Edit")
- public Position trackerPosition = new Position(-1, 200);
-
- @Expose
- @ConfigOption(name = "Hide Tracker", desc = "It will still track the data just in case.")
- @ConfigEditorBoolean
- public boolean hideTracker = true;
- }
+// public static class Trackers {
+//
+// @Expose
+// @ConfigOption(name = "Tracker Position", desc = "Allows you to change the position of the Trackers.")
+// @ConfigEditorButton(runnableId = "tracker", buttonText = "Edit")
+// public Position trackerPosition = new Position(-1, 200);
+//
+// @Expose
+// @ConfigOption(name = "Hide Tracker", desc = "It will still track the data just in case.")
+// @ConfigEditorBoolean
+// public boolean hideTracker = true;
+// }
}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfigEditor.java b/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfigEditor.java
index 113037066..f8f5dc66c 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfigEditor.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfigEditor.java
@@ -40,9 +40,9 @@ public class SBHConfigEditor extends GuiElement {
private final LerpingInteger optionsScroll = new LerpingInteger(0, 150);
private final LerpingInteger categoryScroll = new LerpingInteger(0, 150);
- private LinkedHashMap<String, ConfigProcessor.ProcessedCategory> processedConfig;
- private TreeMap<String, Set<ConfigProcessor.ProcessedOption>> searchOptionMap = new TreeMap<>();
- private HashMap<ConfigProcessor.ProcessedOption, ConfigProcessor.ProcessedCategory> categoryForOption = new HashMap<>();
+ private final LinkedHashMap<String, ConfigProcessor.ProcessedCategory> processedConfig;
+ private final TreeMap<String, Set<ConfigProcessor.ProcessedOption>> searchOptionMap = new TreeMap<>();
+ private final HashMap<ConfigProcessor.ProcessedOption, ConfigProcessor.ProcessedCategory> categoryForOption = new HashMap<>();
public SBHConfigEditor(Config config) {
this(config, null);
@@ -146,7 +146,7 @@ public class SBHConfigEditor extends GuiElement {
RenderUtils.drawFloatingRectDark(x + 5, y + 5, xSize - 10, 20, false);
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
- TextRenderUtils.drawStringCenteredScaledMaxWidth("SkyBlockHud by " + EnumChatFormatting.RED + "ThatGravyBoat" + EnumChatFormatting.RESET + ", config by " + EnumChatFormatting.DARK_PURPLE + "Moulberry", fr, x + xSize / 2f, y + 15, false, 200, 0xa0a0a0);
+ TextRenderUtils.drawStringCenteredScaledMaxWidth("LorenzMod by " + EnumChatFormatting.RED + "hannibal2" + EnumChatFormatting.RESET + ", config by " + EnumChatFormatting.DARK_PURPLE + "Moulberry", fr, x + xSize / 2f, y + 15, false, 200, 0xa0a0a0);
RenderUtils.drawFloatingRectDark(x + 4, y + 49 - 20, 140, ySize - 54 + 20, false);