diff options
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/config')
3 files changed, 20 insertions, 16 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/config/annotations/Option.java b/src/main/java/io/polyfrost/oneconfig/config/annotations/Option.java index a4f4a67..77831db 100644 --- a/src/main/java/io/polyfrost/oneconfig/config/annotations/Option.java +++ b/src/main/java/io/polyfrost/oneconfig/config/annotations/Option.java @@ -32,10 +32,11 @@ public @interface Option { String subcategory(); - /** A String array of all the possible values for the UniSelector, dropdownList, and ComboBox. + /** + * A String array of all the possible values for the UniSelector, dropdownList, and ComboBox. * Also used in the DualOption slider, index 0 is the left, index 1 is the right; for example: * {"Option 1", "Option 2"} - * */ + */ String[] options() default {}; /** @@ -62,10 +63,12 @@ public @interface Option { * Steps of slider (0 for no steps) */ int step() default 0; + /** * Minimum value of slider */ float min() default 0; + /** * The maximum value of the slider */ diff --git a/src/main/java/io/polyfrost/oneconfig/config/interfaces/BasicOption.java b/src/main/java/io/polyfrost/oneconfig/config/interfaces/BasicOption.java index 8d19b55..3c02b69 100644 --- a/src/main/java/io/polyfrost/oneconfig/config/interfaces/BasicOption.java +++ b/src/main/java/io/polyfrost/oneconfig/config/interfaces/BasicOption.java @@ -1,7 +1,5 @@ package io.polyfrost.oneconfig.config.interfaces; -import io.polyfrost.oneconfig.gui.elements.BasicElement; - import java.lang.reflect.Field; @SuppressWarnings({"unused"}) @@ -13,9 +11,9 @@ public abstract class BasicOption { /** * Initialize option * - * @param field variable attached to option (null for category) - * @param name name of option - * @param size size of option, 0 for single column, 1 for double. + * @param field variable attached to option (null for category) + * @param name name of option + * @param size size of option, 0 for single column, 1 for double. */ public BasicOption(Field field, String name, int size) { this.field = field; @@ -48,9 +46,9 @@ public abstract class BasicOption { /** * Function that gets called when drawing option * - * @param vg NanoVG context - * @param x x position - * @param y y position + * @param vg NanoVG context + * @param x x position + * @param y y position */ public abstract void draw(long vg, int x, int y); @@ -58,9 +56,9 @@ public abstract class BasicOption { * Function that gets called last drawing option, * should be used for things that draw above other options * - * @param vg NanoVG context - * @param x x position - * @param y y position + * @param vg NanoVG context + * @param x x position + * @param y y position */ public void drawLast(long vg, int x, int y) { @@ -69,8 +67,8 @@ public abstract class BasicOption { /** * Function that gets called when a key is typed * - * @param key char that has been typed - * @param keyCode code of key + * @param key char that has been typed + * @param keyCode code of key */ public void keyTyped(char key, int keyCode) { } diff --git a/src/main/java/io/polyfrost/oneconfig/config/interfaces/Config.java b/src/main/java/io/polyfrost/oneconfig/config/interfaces/Config.java index ca151db..b3c8c75 100644 --- a/src/main/java/io/polyfrost/oneconfig/config/interfaces/Config.java +++ b/src/main/java/io/polyfrost/oneconfig/config/interfaces/Config.java @@ -18,7 +18,10 @@ import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.nio.charset.StandardCharsets; import java.nio.file.Files; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Map; +import java.util.Optional; public class Config { protected final String configFile; |