summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/config/features/garden/SensitivityReducerConfig.java
blob: 7c1d603197d393e38d5b5f45dbadfd382f6ce55c (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
package at.hannibal2.skyhanni.config.features.garden;

import at.hannibal2.skyhanni.config.core.config.Position;
import com.google.gson.annotations.Expose;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDropdown;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorKeybind;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider;
import io.github.notenoughupdates.moulconfig.annotations.ConfigLink;
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;
import io.github.notenoughupdates.moulconfig.observer.Property;
import org.lwjgl.input.Keyboard;

public class SensitivityReducerConfig {
    @Expose
    @ConfigOption(
        name = "Mode",
        desc = "Lower mouse sensitivity while in the garden.")
    @ConfigEditorDropdown
    public Mode mode = Mode.OFF;

    public enum Mode {
        OFF("Disabled"),
        TOOL("Holding farming tool"),
        KEYBIND("Holding Keybind");
        private final String str;

        Mode(String str) {
            this.str = str;
        }

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

    @Expose
    @ConfigOption(name = "Keybind", desc = "When selected above, press this key to reduce the mouse sensitivity.")
    @ConfigEditorKeybind(defaultKey = Keyboard.KEY_N)
    public int keybind = Keyboard.KEY_N;

    @Expose
    @ConfigOption(name = "Reducing factor", desc = "Change by how much the sensitivity is lowered by.")
    @ConfigEditorSlider(minValue = 1, maxValue = 50, minStep = 1)
    public Property<Float> reducingFactor = Property.of(15.0F);

    @Expose
    @ConfigOption(
        name = "Show GUI",
        desc = "Show the GUI element while the feature is enabled.")
    @ConfigEditorBoolean
    public boolean showGUI = true;

    @Expose
    @ConfigOption(
        name = "Only in Ground",
        desc = "Lower sensitivity when standing on the ground.")
    @ConfigEditorBoolean
    public Property<Boolean> onGround = Property.of(false);

    @Expose
    @ConfigOption(
        name = "Disable in Barn",
        desc = "Disable reduced sensitivity in barn plot.")
    @ConfigEditorBoolean
    public Property<Boolean> onlyPlot = Property.of(true);

    @Expose
    @ConfigLink(owner = SensitivityReducerConfig.class, field = "showGUI")
    public Position position = new Position(400, 400, 0.8f);
}