diff options
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/config')
3 files changed, 17 insertions, 8 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/config/OneConfigConfig.java b/src/main/java/io/polyfrost/oneconfig/config/OneConfigConfig.java index d812f89..da6b4c2 100644 --- a/src/main/java/io/polyfrost/oneconfig/config/OneConfigConfig.java +++ b/src/main/java/io/polyfrost/oneconfig/config/OneConfigConfig.java @@ -19,7 +19,6 @@ public class OneConfigConfig extends Config { public static final int GRAY_900 = new Color(13, 14, 15, 255).getRGB(); // Gray 900 public static final int GRAY_900_80 = new Color(13, 14, 15, 204).getRGB(); // Gray 900 80% - // im waiting for u to say the gray button colors public static final int GRAY_800 = new Color(21, 22, 23, 255).getRGB(); // Gray 800 public static final int GRAY_700 = new Color(34, 35, 38, 255).getRGB(); // Gray 700 public static final int GRAY_600 = new Color(42, 44, 48, 255).getRGB(); // Gray 600 @@ -42,6 +41,8 @@ public class OneConfigConfig extends Config { public static final int WHITE_90 = new Color(255, 255, 255, 229).getRGB(); // White 90% public static final int WHITE = new Color(255, 255, 255, 255).getRGB(); // White 100% + public static final int ERROR_700 = new Color(180, 24, 24, 255).getRGB(); // Red 700 + public static boolean ROUNDED_CORNERS = true; public static float CORNER_RADIUS_WIN = 20f; public static float CORNER_RADIUS = 12f; 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 7a0b6c1..a4f4a67 100644 --- a/src/main/java/io/polyfrost/oneconfig/config/annotations/Option.java +++ b/src/main/java/io/polyfrost/oneconfig/config/annotations/Option.java @@ -31,13 +31,11 @@ public @interface Option { */ String subcategory(); - /** The name shown on the Left option of a DualOption slider. */ - String optionLeft() default "Option 1"; - /** The name shown on the Right option of a DualOption slider. */ - String optionRight() default "Option 2"; - - /** 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 {}; /** @@ -64,6 +62,14 @@ 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 + */ + float max() default 0; /** * Option for info option type 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 211c2ce..2af4357 100644 --- a/src/main/java/io/polyfrost/oneconfig/config/interfaces/Config.java +++ b/src/main/java/io/polyfrost/oneconfig/config/interfaces/Config.java @@ -115,11 +115,13 @@ public class Config { options.add(new ConfigTextBox(field, option.name(), option.size(), option.placeholder(), option.secure(), option.multiLine())); break; case DUAL_OPTION: - options.add(new ConfigDualOption(field, option.name(), option.size(), option.optionLeft(), option.optionRight())); + options.add(new ConfigDualOption(field, option.name(), option.size(), option.options())); break; case UNI_SELECTOR: options.add(new ConfigUniSelector(field, option.name(), option.size(), option.options())); break; + case SLIDER: + options.add(new ConfigSlider(field, option.name(), option.size(), option.min(), option.max(), option.step())); } } } |