summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/config/features/skillprogress/SkillProgressBarConfig.java
blob: 529a4c4cc14940b94097217518d2623bbb87f4b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
package at.hannibal2.skyhanni.config.features.skillprogress;

import at.hannibal2.skyhanni.SkyHanniMod;
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.ConfigEditorColour;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDropdown;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider;
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;
import io.github.notenoughupdates.moulconfig.observer.Property;

public class SkillProgressBarConfig {

    @Expose
    @ConfigOption(name = "Enabled", desc = "Enable or disable the progress bar.")
    @ConfigEditorBoolean
    @FeatureToggle
    public Property<Boolean> enabled = Property.of(false);

    @Expose
    @ConfigOption(name = "Textured Bar", desc = "Use a textured progress bar.\n§eCan be changed with a resource pack.")
    @ConfigEditorBoolean
    public Property<Boolean> useTexturedBar = Property.of(false);

    @Expose
    @ConfigOption(name = "Chroma", desc = "Use the SBA like chroma effect on the bar.\n§eIf enabled, ignore the Bar Color setting.")
    @ConfigEditorBoolean
    public Property<Boolean> useChroma = Property.of(false);

    @Expose
    @ConfigOption(name = "Bar Color", desc = "Color of the progress bar.\n§eIgnored if Chroma is enabled.")
    @ConfigEditorColour
    public String barStartColor = "0:255:255:0:0";

    @Expose
    @ConfigOption(name = "Textured Bar", desc = "")
    @Accordion
    public TexturedBar texturedBar = new TexturedBar();

    public static class TexturedBar {

        @Expose
        @ConfigOption(name = "Used Texture", desc = "Choose what texture to use.")
        @ConfigEditorDropdown
        public Property<UsedTexture> usedTexture = Property.of(UsedTexture.MATCH_PACK);

        public enum UsedTexture {
            MATCH_PACK("Match Resource Pack", "minecraft:textures/gui/icons.png"),
            CUSTOM_1("Texture 1", SkyHanniMod.MODID + ":bars/1.png"),
            CUSTOM_2("Texture 2", SkyHanniMod.MODID + ":bars/2.png"),
            CUSTOM_3("Texture 3", SkyHanniMod.MODID + ":bars/3.png"),
            CUSTOM_4("Texture 4", SkyHanniMod.MODID + ":bars/4.png"),
            CUSTOM_5("Texture 5", SkyHanniMod.MODID + ":bars/5.png"),
            ;

            private final String str;
            private final String path;

            UsedTexture(String str, String path) {
                this.str = str;
                this.path = path;
            }

            public String getPath() {
                return path;
            }

            @Override
            public String toString() {
                return str;
            }
        }

        @Expose
        @ConfigOption(name = "Width", desc = "Modify the width of the bar.\n" +
            "§eDefault: 182\n" +
            "§c!!Do not work for now!!")
        @ConfigEditorSlider(minStep = 1, minValue = 16, maxValue = 1024)
        public int width = 182;

        @Expose
        @ConfigOption(name = "Height", desc = "Modify the height of the bar.\n" +
            "§eDefault: 5\n" +
            "§c!!Do not work for now!!")
        @ConfigEditorSlider(minStep = 1, minValue = 3, maxValue = 16)
        public int height = 5;
    }

    @Expose
    @ConfigOption(name = "Regular Bar", desc = "")
    @Accordion
    public RegularBar regularBar = new RegularBar();

    public static class RegularBar {
        @Expose
        @ConfigOption(name = "Width", desc = "Modify the width of the bar.")
        @ConfigEditorSlider(minStep = 1, minValue = 100, maxValue = 1000)
        public int width = 182;

        @Expose
        @ConfigOption(name = "Height", desc = "Modify the height of the bar.")
        @ConfigEditorSlider(minStep = 1, minValue = 3, maxValue = 15)
        public int height = 6;
    }
}