From cc629382945460d48fc9fa6472106df9fcbb589d Mon Sep 17 00:00:00 2001 From: Empa <42304516+ItsEmpa@users.noreply.github.com> Date: Sun, 9 Jun 2024 19:41:41 +0200 Subject: Feature: Custom Wardrobe (#2039) Co-authored-by: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> Co-authored-by: Cal Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../config/features/inventory/InventoryConfig.java | 27 ++-- .../inventory/customwardrobe/ColorConfig.java | 44 +++++++ .../customwardrobe/CustomWardrobeConfig.java | 54 ++++++++ .../inventory/customwardrobe/SpacingConfig.java | 145 +++++++++++++++++++++ 4 files changed, 256 insertions(+), 14 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/ColorConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/CustomWardrobeConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/SpacingConfig.java (limited to 'src/main/java/at/hannibal2/skyhanni/config/features') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java index 05f701059..f20643cc3 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.config.features.inventory; import at.hannibal2.skyhanni.config.FeatureToggle; import at.hannibal2.skyhanni.config.HasLegacyId; import at.hannibal2.skyhanni.config.features.inventory.chocolatefactory.ChocolateFactoryConfig; +import at.hannibal2.skyhanni.config.features.inventory.customwardrobe.CustomWardrobeConfig; import at.hannibal2.skyhanni.config.features.inventory.helper.HelperConfig; import at.hannibal2.skyhanni.config.features.itemability.ItemAbilityConfig; import at.hannibal2.skyhanni.config.features.misc.EstimatedItemValueConfig; @@ -49,6 +50,10 @@ public class InventoryConfig { @Category(name = "Item Abilities", desc = "Stuff about item abilities.") public ItemAbilityConfig itemAbilities = new ItemAbilityConfig(); + @Expose + @Category(name = "Custom Wardrobe", desc = "New Wardrobe Look.") + public CustomWardrobeConfig customWardrobe = new CustomWardrobeConfig(); + @Expose @Category(name = "Chocolate Factory", desc = "Features to help you master the Chocolate Factory idle game.") public ChocolateFactoryConfig chocolateFactory = new ChocolateFactoryConfig(); @@ -93,16 +98,13 @@ public class InventoryConfig { @Accordion public GetFromSackConfig gfs = new GetFromSackConfig(); + @Expose @ConfigOption(name = "Pocket Sack-In-A-Sack", desc = "") @Accordion - @Expose public PocketSackInASackConfig pocketSackInASack = new PocketSackInASackConfig(); @Expose - @ConfigOption( - name = "Item Number", - desc = "Showing the item number as a stack size for these items." - ) + @ConfigOption(name = "Item Number", desc = "Showing the item number as a stack size for these items.") @ConfigEditorDraggableList public List itemNumberAsStackSize = new ArrayList<>(Arrays.asList( NEW_YEAR_CAKE, @@ -168,10 +170,10 @@ public class InventoryConfig { public boolean vacuumBagCap = true; @Expose - @ConfigOption( - name = "Quick Craft Confirmation", + @ConfigOption(name = "Quick Craft Confirmation", desc = "Require Ctrl+Click to craft items that aren't often quick crafted " + - "(e.g. armor, weapons, accessories). Sack items can be crafted normally." + "(e.g. armor, weapons, accessories). " + + "Sack items can be crafted normally." ) @ConfigEditorBoolean @FeatureToggle @@ -190,23 +192,20 @@ public class InventoryConfig { public boolean anvilCombineHelper = false; @Expose - @ConfigOption(name = "Item Stars", - desc = "Show a compact star count in the item name for all items.") + @ConfigOption(name = "Item Stars", desc = "Show a compact star count in the item name for all items.") @ConfigEditorBoolean @FeatureToggle public boolean itemStars = false; @Expose - @ConfigOption(name = "Missing Tasks", - desc = "Highlight missing tasks in the SkyBlock Level Guide inventory.") + @ConfigOption(name = "Missing Tasks", desc = "Highlight missing tasks in the SkyBlock Level Guide inventory.") // TODO move( , "inventory.highlightMissingSkyBlockLevelGuide", "inventory.skyblockGuideConfig.highlightMissingSkyBlockLevelGuide") @ConfigEditorBoolean @FeatureToggle public boolean highlightMissingSkyBlockLevelGuide = true; @Expose - @ConfigOption(name = "Power Stone Guide", - desc = "Highlight missing power stones, show their total bazaar price, and allows to open the bazaar when clicking on the items in the Power Stone Guide.") + @ConfigOption(name = "Power Stone Guide", desc = "Highlight missing power stones, show their total bazaar price, and allows to open the bazaar when clicking on the items in the Power Stone Guide.") // TODO move( , "inventory.powerStoneGuide", "inventory.skyblockGuideConfig.powerStoneGuide") @ConfigEditorBoolean @FeatureToggle 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 new file mode 100644 index 000000000..20f928254 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/ColorConfig.java @@ -0,0 +1,44 @@ +package at.hannibal2.skyhanni.config.features.inventory.customwardrobe; + +import com.google.gson.annotations.Expose; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorColour; +import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; + +public class ColorConfig { + + @Expose + @ConfigOption(name = "Background", desc = "Color of the GUI background.") + @ConfigEditorColour + public String backgroundColor = "0:127:0:0:0"; + + @Expose + @ConfigOption(name = "Equipped", desc = "Color of the currently equipped wardrobe slot.") + @ConfigEditorColour + public String equippedColor = "0:127:85:255:85"; + + @Expose + @ConfigOption(name = "Favorite", desc = "Color of the wardrobe slots that have been added as favorites.") + @ConfigEditorColour + public String favoriteColor = "0:127:255:85:85"; + + @Expose + @ConfigOption(name = "Same Page", desc = "Color of wardrobe slots in the same page.") + @ConfigEditorColour + public String samePageColor = "0:127:94:108:255"; + + @Expose + @ConfigOption(name = "Other Page", desc = "Color of wardrobe slots in another page.") + @ConfigEditorColour + public String otherPageColor = "0:127:0:0:0"; + + @Expose + @ConfigOption(name = "Top Outline", desc = "Color of the top of the outline when hovered.") + @ConfigEditorColour + public String topBorderColor = "0:255:255:200:0"; + + @Expose + @ConfigOption(name = "Bottom Outline", desc = "Color of the bottom of the outline when hovered.") + @ConfigEditorColour + public String bottomBorderColor = "0:255:255:0:0"; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/CustomWardrobeConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/CustomWardrobeConfig.java new file mode 100644 index 000000000..a4ea69bad --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/CustomWardrobeConfig.java @@ -0,0 +1,54 @@ +package at.hannibal2.skyhanni.config.features.inventory.customwardrobe; + +import at.hannibal2.skyhanni.config.FeatureToggle; +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.ConfigOption; + +public class CustomWardrobeConfig { + + @Expose + @ConfigOption(name = "Enable", desc = "Enables the Custom Wardrobe GUI.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Follow mouse", desc = "Players follow the movement of the mouse.") + @ConfigEditorBoolean + public boolean eyesFollowMouse = true; + + @Expose + @ConfigOption(name = "Hide Empty Slots", desc = "Hides wardrobe slots with no armor.") + @ConfigEditorBoolean + public boolean hideEmptySlots = false; + + @Expose + @ConfigOption(name = "Hide Locked Slots", desc = "Hides locked wardrobe slots.") + @ConfigEditorBoolean + public boolean hideLockedSlots = false; + + @Expose + public boolean onlyFavorites = false; + + @Expose + @ConfigOption(name = "Estimated Value", desc = "Show a §2$ §7sign you can hover to see the wardrobe slot value.") + @ConfigEditorBoolean + public boolean estimatedValue = true; + + @Expose + @ConfigOption(name = "Loading text", desc = "Shows a \"§cLoading...\" §7text when the wardrobe page hasn't fully loaded in yet.") + @ConfigEditorBoolean + public boolean loadingText = true; + + @Expose + @ConfigOption(name = "Colors", desc = "Change the color settings.") + @Accordion + public ColorConfig color = new ColorConfig(); + + @Expose + @ConfigOption(name = "Spacing", desc = "") + @Accordion + public SpacingConfig spacing = new SpacingConfig(); +} 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 new file mode 100644 index 000000000..363a9a6a7 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/SpacingConfig.java @@ -0,0 +1,145 @@ +package at.hannibal2.skyhanni.config.features.inventory.customwardrobe; + +import com.google.gson.annotations.Expose; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider; +import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; +import io.github.notenoughupdates.moulconfig.observer.Property; + +public class SpacingConfig { + + @Expose + @ConfigOption(name = "Global Scale", desc = "Controls the scale of the entirety of the wardrobe.") + @ConfigEditorSlider( + minValue = 30, + maxValue = 200, + minStep = 1 + ) + public Property globalScale = Property.of(100); + + @Expose + @ConfigOption(name = "Outline Thickness", desc = "How thick the outline of the hovered slot is.") + @ConfigEditorSlider( + minValue = 1, + maxValue = 15, + minStep = 1 + ) + public Property outlineThickness = Property.of(5); + + @Expose + @ConfigOption(name = "Outline Blur", desc = "Amount of blur of the outline.") + @ConfigEditorSlider( + minValue = 0f, + maxValue = 1f, + minStep = 0.1f + ) + public Property outlineBlur = Property.of(0.5f); + + @Expose + @ConfigOption(name = "Slot Width", desc = "Width of the wardrobe slots.") + @ConfigEditorSlider( + minValue = 30, + maxValue = 100, + minStep = 1 + ) + public Property slotWidth = Property.of(75); + + @Expose + @ConfigOption(name = "Slot Height", desc = "Height of the wardrobe slots.") + @ConfigEditorSlider( + minValue = 60, + maxValue = 200, + minStep = 1 + ) + public Property slotHeight = Property.of(140); + + @Expose + @ConfigOption(name = "Player Scale", desc = "Scale of the players.") + @ConfigEditorSlider( + minValue = 0, + maxValue = 100, + minStep = 1 + ) + public Property playerScale = Property.of(75); + + @Expose + @ConfigOption(name = "Slots per Row", desc = "Max amount of wardrobe slots per row.") + @ConfigEditorSlider( + minValue = 5, + maxValue = 18, + minStep = 1 + ) + public Property maxPlayersPerRow = Property.of(9); + + @Expose + @ConfigOption(name = "Slots Horizontal Spacing", desc = "How much space horizontally between wardrobe slots.") + @ConfigEditorSlider( + minValue = 1, + maxValue = 20, + minStep = 1 + ) + public Property horizontalSpacing = Property.of(3); + + @Expose + @ConfigOption(name = "Slots Vertical Spacing", desc = "How much space vertically between wardrobe slots.") + @ConfigEditorSlider( + minValue = 1, + maxValue = 20, + minStep = 1 + ) + public Property verticalSpacing = Property.of(3); + + @Expose + @ConfigOption(name = "Slots & Buttons Spacing", desc = "How much vertical space there is between wardrobe slots and the buttons.") + @ConfigEditorSlider( + minValue = 1, + maxValue = 40, + minStep = 1 + ) + public Property buttonSlotsVerticalSpacing = Property.of(10); + + @Expose + @ConfigOption(name = "Button Horizontal Spacing", desc = "How much space horizontally between buttons.") + @ConfigEditorSlider( + minValue = 1, + maxValue = 40, + minStep = 1 + ) + public Property buttonHorizontalSpacing = Property.of(10); + + @Expose + @ConfigOption(name = "Button Vertical Spacing", desc = "How much space vertically between buttons.") + @ConfigEditorSlider( + minValue = 1, + maxValue = 40, + minStep = 1 + ) + public Property buttonVerticalSpacing = Property.of(10); + + @Expose + @ConfigOption(name = "Button Width", desc = "Width of the buttons.") + @ConfigEditorSlider( + minValue = 1, + maxValue = 60, + minStep = 1 + ) + public Property buttonWidth = Property.of(50); + + @Expose + @ConfigOption(name = "Button Height", desc = "Height of the buttons.") + @ConfigEditorSlider( + minValue = 1, + maxValue = 60, + minStep = 1 + ) + public Property buttonHeight = Property.of(20); + + @Expose + @ConfigOption(name = "Background Padding", desc = "Space between the edges of the background and the slots.") + @ConfigEditorSlider( + minValue = 1, + maxValue = 20, + minStep = 1 + ) + public Property backgroundPadding = Property.of(10); + +} -- cgit