From a15ef68de8e33df296c565d12994df2ee965626e Mon Sep 17 00:00:00 2001 From: Vixid <52578495+VixidDev@users.noreply.github.com> Date: Sat, 27 Apr 2024 12:07:55 +0100 Subject: Improvement: Added Outline to Custom Scoreboard (#1461) Co-authored-by: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../gui/customscoreboard/BackgroundConfig.java | 6 +++ .../customscoreboard/BackgroundOutlineConfig.java | 58 ++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/BackgroundOutlineConfig.java (limited to 'src/main/java/at/hannibal2/skyhanni/config/features') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/BackgroundConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/BackgroundConfig.java index 262988af7..18ffd3c58 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/BackgroundConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/BackgroundConfig.java @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.config.features.gui.customscoreboard; 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.ConfigEditorColour; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorInfoText; @@ -48,6 +49,11 @@ public class BackgroundConfig { ) public int roundedCornerSmoothness = 10; + @Expose + @ConfigOption(name = "Background Outline", desc = "") + @Accordion + public BackgroundOutlineConfig outline = new BackgroundOutlineConfig(); + @Expose @ConfigOption( name = "Use Custom Background Image", diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/BackgroundOutlineConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/BackgroundOutlineConfig.java new file mode 100644 index 000000000..43795c2cd --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/BackgroundOutlineConfig.java @@ -0,0 +1,58 @@ +package at.hannibal2.skyhanni.config.features.gui.customscoreboard; + +import com.google.gson.annotations.Expose; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorColour; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider; +import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; + +public class BackgroundOutlineConfig { + + @Expose + @ConfigOption( + name = "Outline", + desc = "Shows an outline around the scoreboard." + ) + @ConfigEditorBoolean + public boolean enabled = false; + + @Expose + @ConfigOption( + name = "Outline Thickness", + desc = "Thickness of the outline." + ) + @ConfigEditorSlider( + minValue = 1, + maxValue = 15, + minStep = 1 + ) + public int thickness = 5; + + @Expose + @ConfigOption( + name = "Outline Blur", + desc = "Amount that the outline is blurred." + ) + @ConfigEditorSlider( + minValue = 0.0f, + maxValue = 1.0f, + minStep = 0.1f + ) + public float blur = 0.7f; + + @Expose + @ConfigOption( + name = "Outline Color Top", + desc = "Color of the top of the outline." + ) + @ConfigEditorColour + public String colorTop = "0:255:175:89:255"; + + @Expose + @ConfigOption( + name = "Outline Color Bottom", + desc = "Color of the bottom of the outline." + ) + @ConfigEditorColour + public String colorBottom = "0:255:127:237:255"; +} -- cgit