aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/ColorConfig.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/SpacingConfig.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobeReset.kt41
3 files changed, 53 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/ColorConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/ColorConfig.java
index 20f928254..f088f72ea 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/ColorConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/ColorConfig.java
@@ -1,11 +1,17 @@
package at.hannibal2.skyhanni.config.features.inventory.customwardrobe;
+import at.hannibal2.skyhanni.features.inventory.wardrobe.CustomWardrobeReset;
import com.google.gson.annotations.Expose;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorButton;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorColour;
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;
public class ColorConfig {
+ @ConfigOption(name = "Reset to Default", desc = "Reset all custom wardrobe color settings to the default.")
+ @ConfigEditorButton(buttonText = "Reset")
+ public Runnable resetColor = CustomWardrobeReset::resetColor;
+
@Expose
@ConfigOption(name = "Background", desc = "Color of the GUI background.")
@ConfigEditorColour
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/SpacingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/SpacingConfig.java
index 13bf54207..4f9887348 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/SpacingConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/SpacingConfig.java
@@ -1,12 +1,18 @@
package at.hannibal2.skyhanni.config.features.inventory.customwardrobe;
+import at.hannibal2.skyhanni.features.inventory.wardrobe.CustomWardrobeReset;
import com.google.gson.annotations.Expose;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorButton;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider;
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;
import io.github.notenoughupdates.moulconfig.observer.Property;
public class SpacingConfig {
+ @ConfigOption(name = "Reset to Default", desc = "Reset all custom wardrobe spacing settings to the default.")
+ @ConfigEditorButton(buttonText = "Reset")
+ public Runnable resetSpacing = CustomWardrobeReset::resetSpacing;
+
@Expose
@ConfigOption(name = "Global Scale", desc = "Control the scale of the entirety of the wardrobe.")
@ConfigEditorSlider(
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobeReset.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobeReset.kt
new file mode 100644
index 000000000..209bd3df7
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobeReset.kt
@@ -0,0 +1,41 @@
+package at.hannibal2.skyhanni.features.inventory.wardrobe
+
+import at.hannibal2.skyhanni.SkyHanniMod
+
+object CustomWardrobeReset {
+ private val config get() = SkyHanniMod.feature.inventory.customWardrobe
+
+ @JvmStatic
+ fun resetSpacing() {
+ with(config.spacing) {
+ globalScale.set(100)
+ outlineThickness.set(5)
+ outlineBlur.set(0.5f)
+ slotWidth.set(75)
+ slotHeight.set(140)
+ playerScale.set(75)
+ maxPlayersPerRow.set(9)
+ horizontalSpacing.set(3)
+ verticalSpacing.set(3)
+ buttonSlotsVerticalSpacing.set(10)
+ buttonHorizontalSpacing.set(10)
+ buttonVerticalSpacing.set(10)
+ buttonWidth.set(50)
+ buttonHeight.set(20)
+ backgroundPadding.set(10)
+ }
+ }
+
+ @JvmStatic
+ fun resetColor() {
+ with(config.color) {
+ backgroundColor = "0:127:0:0:0"
+ equippedColor = "0:127:85:255:85"
+ favoriteColor = "0:127:255:85:85"
+ samePageColor = "0:127:94:108:255"
+ otherPageColor = "0:127:0:0:0"
+ topBorderColor = "0:255:255:200:0"
+ bottomBorderColor = "0:255:255:0:0"
+ }
+ }
+}