From 83d48c6aeee1656c5a6966839a1951e67fccbc53 Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Sat, 7 Sep 2024 19:59:58 +0200 Subject: Feature: Display Tab Widgets (#1276) Co-authored-by: Cal Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../skyhanni/config/features/gui/GUIConfig.java | 5 +++ .../config/features/gui/TabWidgetConfig.java | 40 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/gui/TabWidgetConfig.java (limited to 'src/main/java/at/hannibal2/skyhanni/config/features') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/GUIConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/GUIConfig.java index 6355857f5..74ab755c9 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/gui/GUIConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/GUIConfig.java @@ -86,6 +86,11 @@ public class GUIConfig { @Accordion public TextBoxConfig customTextBox = new TextBoxConfig(); + @Expose + @ConfigOption(name = "Tab Widget", desc = "") + @Accordion + public TabWidgetConfig tabWidget = new TabWidgetConfig(); + @Expose @ConfigOption(name = "In-Game Date", desc = "") @Accordion diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/TabWidgetConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/TabWidgetConfig.java new file mode 100644 index 000000000..2d4b27cb1 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/TabWidgetConfig.java @@ -0,0 +1,40 @@ +package at.hannibal2.skyhanni.config.features.gui; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.PositionList; +import at.hannibal2.skyhanni.features.gui.TabWidgetDisplay; +import com.google.gson.annotations.Expose; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDraggableList; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorInfoText; +import io.github.notenoughupdates.moulconfig.annotations.ConfigLink; +import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; + +import java.util.ArrayList; +import java.util.List; + +public class TabWidgetConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Enables the gui elements for the selected widgets.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @ConfigOption(name = "Not working Info", desc = "If the information isn't shown in the tablist it won't show anything. Use /widget to turn on the information you need.") + @ConfigEditorInfoText + public String text1; + + @ConfigOption(name = "Enable Info", desc = "Drag only one new value at time into the list, since the default locations are all the same.") + @ConfigEditorInfoText + public String text2; + + @Expose + @ConfigOption(name = "Widgets", desc = "") + @ConfigEditorDraggableList + public List display = new ArrayList<>(); + + @Expose + @ConfigLink(owner = TabWidgetConfig.class, field = "enabled") + public PositionList displayPositions = new PositionList(TabWidgetDisplay.getEntries().size()); +} -- cgit