diff options
author | J10a1n15 <45315647+j10a1n15@users.noreply.github.com> | 2024-07-15 20:39:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-15 20:39:57 +0200 |
commit | b7c7711d40a0676d530d7b8eb258ec946f8012ad (patch) | |
tree | 30362e3da813e9a0438681c9143d7d6b6ee37f1b /src/main/java/at | |
parent | f9e0fbd23a8243b931a43f48818e8d76f8e0cbd7 (diff) | |
download | skyhanni-b7c7711d40a0676d530d7b8eb258ec946f8012ad.tar.gz skyhanni-b7c7711d40a0676d530d7b8eb258ec946f8012ad.tar.bz2 skyhanni-b7c7711d40a0676d530d7b8eb258ec946f8012ad.zip |
Improvement: Add Reset Buttons to Custom Scoreboard (#2141)
Diffstat (limited to 'src/main/java/at')
3 files changed, 17 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/CustomScoreboardConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/CustomScoreboardConfig.java index d429261b0..bc3dc1fc6 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/CustomScoreboardConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/CustomScoreboardConfig.java @@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardElement; import com.google.gson.annotations.Expose; import io.github.notenoughupdates.moulconfig.annotations.Accordion; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorButton; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDraggableList; import io.github.notenoughupdates.moulconfig.annotations.ConfigLink; import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; @@ -32,6 +33,12 @@ public class CustomScoreboardConfig { @ConfigEditorDraggableList() public List<ScoreboardElement> scoreboardEntries = new ArrayList<>(ScoreboardElement.defaultOption); + @ConfigOption(name = "Reset Appearance", desc = "Reset the appearance of the advanced scoreboard.") + @ConfigEditorButton(buttonText = "Reset") + public Runnable reset = () -> { + scoreboardEntries = ScoreboardElement.defaultOption; + }; + @Expose @ConfigOption(name = "Display Options", desc = "") @Accordion diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/EventsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/EventsConfig.java index f2fd7a85a..0093b8588 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/EventsConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/EventsConfig.java @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.config.features.gui.customscoreboard; import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardEvent; import com.google.gson.annotations.Expose; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorButton; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDraggableList; import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; @@ -19,6 +20,12 @@ public class EventsConfig { @ConfigEditorDraggableList() public List<ScoreboardEvent> eventEntries = new ArrayList<>(ScoreboardEvent.defaultOption); + @ConfigOption(name = "Reset Events Priority", desc = "Reset the priority of all events.") + @ConfigEditorButton(buttonText = "Reset") + public Runnable reset = () -> { + eventEntries = ScoreboardEvent.defaultOption; + }; + @Expose @ConfigOption(name = "Show all active events", desc = "Show all active events in the scoreboard instead of the one with the highest priority.") @ConfigEditorBoolean diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt index 1a435a269..a3b3652b2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt @@ -320,6 +320,7 @@ enum class ScoreboardElement( MOTES, BITS, COPPER, + GEMS, NORTH_STARS, HEAT, COLD, @@ -333,13 +334,14 @@ enum class ScoreboardElement( DATE, TIME, EVENTS, - OBJECTIVE, COOKIE, EMPTY_LINE3, QUIVER, POWER, TUNING, EMPTY_LINE4, + OBJECTIVE, + SLAYER, POWDER, MAYOR, PARTY, |