From 0283a6618360ed473da42c1144da5b44146155bb Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Sat, 30 Apr 2022 17:05:10 +0200 Subject: more config system stuff --- .../oneconfig/config/annotations/ConfigPage.java | 32 ++++++++++++++++++++++ .../oneconfig/config/annotations/Option.java | 10 +++---- 2 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 src/main/java/io/polyfrost/oneconfig/config/annotations/ConfigPage.java (limited to 'src/main/java/io/polyfrost/oneconfig/config/annotations') diff --git a/src/main/java/io/polyfrost/oneconfig/config/annotations/ConfigPage.java b/src/main/java/io/polyfrost/oneconfig/config/annotations/ConfigPage.java new file mode 100644 index 0000000..fecd438 --- /dev/null +++ b/src/main/java/io/polyfrost/oneconfig/config/annotations/ConfigPage.java @@ -0,0 +1,32 @@ +package io.polyfrost.oneconfig.config.annotations; + +import io.polyfrost.oneconfig.config.data.PageLocation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface ConfigPage { + /** + * The name of the page that will be displayed to the user + */ + String name(); + + /** + * If the page button is at the top or bottem of the page + */ + PageLocation location(); + + /** + * The description of the page that will be displayed to the user + */ + String description() default ""; + + /** + * The category of the page + */ + String category() default "general"; +} 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 b7bcf4f..fe61a02 100644 --- a/src/main/java/io/polyfrost/oneconfig/config/annotations/Option.java +++ b/src/main/java/io/polyfrost/oneconfig/config/annotations/Option.java @@ -16,11 +16,6 @@ public @interface Option { */ String name(); - /** - * The description of the page that will be displayed to the user - */ - String description() default ""; - /** * The type of the option */ @@ -50,6 +45,11 @@ public @interface Option { */ int size() default 1; + /** + * The placeholder in the text field + */ + String placeholder() default ""; + /** * If the text field is secure or not */ -- cgit