diff options
author | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-02-12 19:44:15 +0100 |
---|---|---|
committer | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-02-12 19:44:15 +0100 |
commit | 78274eb2b66b27052fe32960916fa4419202dc76 (patch) | |
tree | 92412c6a835cf07dbee6dbd232c71e299740bad6 /src/main/java/io/polyfrost/oneconfig/gui/elements | |
parent | 56b75c981609a89639dfd3860ca890af64d2bfbe (diff) | |
download | OneConfig-78274eb2b66b27052fe32960916fa4419202dc76.tar.gz OneConfig-78274eb2b66b27052fe32960916fa4419202dc76.tar.bz2 OneConfig-78274eb2b66b27052fe32960916fa4419202dc76.zip |
finish config backend
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/gui/elements')
7 files changed, 156 insertions, 6 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigButton.java b/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigButton.java index de21d9d..a6951a6 100644 --- a/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigButton.java +++ b/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigButton.java @@ -1,4 +1,24 @@ package io.polyfrost.oneconfig.gui.elements.config; -public class OConfigButton { +import io.polyfrost.oneconfig.interfaces.Option; + +import java.lang.reflect.Field; + +public class OConfigButton extends Option { + private final String text; + + public OConfigButton(Field field, String name, String description, String text) { + super(field, name, description); + this.text = text; + } + + @Override + public int getHeight() { + return 0; + } + + @Override + public void draw(int x, int y, int width, int mouseX, int mouseY) { + + } } diff --git a/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigCategory.java b/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigCategory.java new file mode 100644 index 0000000..0eae75a --- /dev/null +++ b/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigCategory.java @@ -0,0 +1,24 @@ +package io.polyfrost.oneconfig.gui.elements.config; + +import io.polyfrost.oneconfig.interfaces.Option; + +import java.util.List; + +public class OConfigCategory extends Option { + public final List<Option> options; + + public OConfigCategory(String name, String description, List<Option> options) { + super(null, name, description); + this.options = options; + } + + @Override + public int getHeight() { + return 0; + } + + @Override + public void draw(int x, int y, int width, int mouseX, int mouseY) { + + } +} diff --git a/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigColor.java b/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigColor.java index 299c4f2..fb60af7 100644 --- a/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigColor.java +++ b/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigColor.java @@ -1,4 +1,24 @@ package io.polyfrost.oneconfig.gui.elements.config; -public class OConfigColor { +import io.polyfrost.oneconfig.interfaces.Option; + +import java.lang.reflect.Field; + +public class OConfigColor extends Option { + private final boolean allowAlpha; + + public OConfigColor(Field field, String name, String description, boolean allowAlpha) { + super(field, name, description); + this.allowAlpha = allowAlpha; + } + + @Override + public int getHeight() { + return 0; + } + + @Override + public void draw(int x, int y, int width, int mouseX, int mouseY) { + + } } diff --git a/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigSelector.java b/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigSelector.java index cc76814..c979131 100644 --- a/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigSelector.java +++ b/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigSelector.java @@ -1,4 +1,26 @@ package io.polyfrost.oneconfig.gui.elements.config; -public class OConfigSelector { +import io.polyfrost.oneconfig.interfaces.Option; + +import java.lang.reflect.Field; + +public class OConfigSelector extends Option { + private final String[] options; + private final int defaultSelection; + + public OConfigSelector(Field field, String name, String description, String[] options, int defaultSelection) { + super(field, name, description); + this.options = options; + this.defaultSelection = defaultSelection; + } + + @Override + public int getHeight() { + return 0; + } + + @Override + public void draw(int x, int y, int width, int mouseX, int mouseY) { + + } } diff --git a/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigSlider.java b/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigSlider.java index 38bacf7..55c1222 100644 --- a/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigSlider.java +++ b/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigSlider.java @@ -1,4 +1,28 @@ package io.polyfrost.oneconfig.gui.elements.config; -public class OConfigSlider { +import io.polyfrost.oneconfig.interfaces.Option; + +import java.lang.reflect.Field; + +public class OConfigSlider extends Option { + private final float min; + private final float max; + private final float precision; + + public OConfigSlider(Field field, String name, String description, float min, float max, float precision) { + super(field, name, description); + this.min = min; + this.max = max; + this.precision = precision; + } + + @Override + public int getHeight() { + return 0; + } + + @Override + public void draw(int x, int y, int width, int mouseX, int mouseY) { + + } } diff --git a/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigSwitch.java b/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigSwitch.java index c9d6091..1fa1590 100644 --- a/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigSwitch.java +++ b/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigSwitch.java @@ -1,4 +1,22 @@ package io.polyfrost.oneconfig.gui.elements.config; -public class OConfigSwitch { +import io.polyfrost.oneconfig.interfaces.Option; + +import java.lang.reflect.Field; + +public class OConfigSwitch extends Option { + + public OConfigSwitch(Field field, String name, String description) { + super(field, name, description); + } + + @Override + public int getHeight() { + return 0; + } + + @Override + public void draw(int x, int y, int width, int mouseX, int mouseY) { + + } } diff --git a/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigText.java b/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigText.java index 68f2b8b..195607a 100644 --- a/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigText.java +++ b/src/main/java/io/polyfrost/oneconfig/gui/elements/config/OConfigText.java @@ -1,4 +1,26 @@ package io.polyfrost.oneconfig.gui.elements.config; -public class OConfigText { +import io.polyfrost.oneconfig.interfaces.Option; + +import java.lang.reflect.Field; + +public class OConfigText extends Option { + private final String placeholder; + private final boolean hideText; + + public OConfigText(Field field, String name, String description, String placeholder, boolean hideText) { + super(field, name, description); + this.placeholder = placeholder; + this.hideText = hideText; + } + + @Override + public int getHeight() { + return 0; + } + + @Override + public void draw(int x, int y, int width, int mouseX, int mouseY) { + + } } |