From aec3ef4836160068e3b6a822a0abfa532650aa7d Mon Sep 17 00:00:00 2001 From: jani270 <69345714+jani270@users.noreply.github.com> Date: Mon, 28 Nov 2022 23:10:43 +0100 Subject: Added Overlaystyle option to powder grinding tracker (#448) Co-authored-by: nopo --- .../options/seperateSections/Mining.java | 12 +++++++++++- .../notenoughupdates/overlays/OverlayManager.java | 21 ++++++++++++++------- .../notenoughupdates/profileviewer/MiningPage.java | 4 ++-- 3 files changed, 27 insertions(+), 10 deletions(-) (limited to 'src/main') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java index 43273c3d..b82b44c2 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java @@ -735,7 +735,6 @@ public class Mining { @ConfigEditorAccordion(id = 9) public boolean powderGrindingTrackerAccordion = false; - @Expose @ConfigOption( name = "Enable Tracker", @@ -768,6 +767,17 @@ public class Mining { @Expose public Position powderGrindingTrackerPosition = new Position(10, 265); + @Expose + @ConfigOption( + name = "Overlay Style", + desc = "Change the style of the Powder Grinding Tracker information Overlay" + ) + @ConfigEditorDropdown( + values = {"Background", "No Shadow", "Shadow", "Full Shadow"} + ) + @ConfigAccordionId(id = 9) + public int powderGrindingTrackerOverlayStyle = 0; + @Expose @ConfigOption( name = "Tracker Reset Mode", diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/OverlayManager.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/OverlayManager.java index edb86337..a8b7112f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/OverlayManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/OverlayManager.java @@ -109,13 +109,20 @@ public class OverlayManager { "\u00a73Gemstone Powder Found: \u00a7d6,243", "\u00a73Average Gemstone Powder/Chest: \u00a7d568" ); - powderGrindingOverlay = new PowderGrindingOverlay(NotEnoughUpdates.INSTANCE.config.mining.powderGrindingTrackerPosition, () -> { - List strings = new ArrayList<>(); - for (int i : NotEnoughUpdates.INSTANCE.config.mining.powderGrindingTrackerText) { - if (i >= 0 && i < powderGrindingDummy.size()) strings.add(powderGrindingDummy.get(i)); - } - return strings; - }, () -> TextOverlayStyle.BACKGROUND); + powderGrindingOverlay = + new PowderGrindingOverlay(NotEnoughUpdates.INSTANCE.config.mining.powderGrindingTrackerPosition, () -> { + List strings = new ArrayList<>(); + for (int i : NotEnoughUpdates.INSTANCE.config.mining.powderGrindingTrackerText) { + if (i >= 0 && i < powderGrindingDummy.size()) strings.add(powderGrindingDummy.get(i)); + } + return strings; + }, () -> { + int style = NotEnoughUpdates.INSTANCE.config.mining.powderGrindingTrackerOverlayStyle; + if (style >= 0 && style < TextOverlayStyle.values().length) { + return TextOverlayStyle.values()[style]; + } + return TextOverlayStyle.BACKGROUND; + }); List farmingDummy = Lists.newArrayList( "\u00a7bCounter: \u00a7e37,547,860", diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MiningPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MiningPage.java index d3b43e20..c8ec09d3 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MiningPage.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MiningPage.java @@ -575,7 +575,7 @@ public class MiningPage extends GuiProfileViewerPage { "§7Level " + luckofcave + EnumChatFormatting.DARK_GRAY + "/45", "", "§7Increases the chance for you to", - "§7trigger rare occurrences im", + "§7trigger rare occurrences in", "§2Dwarven Mines " + EnumChatFormatting.GRAY + "by " + EnumChatFormatting.GREEN + luckofcaveStat + "%§7.", "", EnumChatFormatting.GRAY + "Cost", @@ -589,7 +589,7 @@ public class MiningPage extends GuiProfileViewerPage { "§7Level " + luckofcave + EnumChatFormatting.DARK_GRAY + "/45", "", "§7Increases the chance for you to", - "§7trigger rare occurrences im", + "§7trigger rare occurrences in", "§2Dwarven Mines " + EnumChatFormatting.GRAY + "by " + EnumChatFormatting.GREEN + luckofcaveStat + "%§7." ), 45 -- cgit