aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/polyfrost/oneconfig/config/annotations
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/config/annotations')
-rw-r--r--src/main/java/io/polyfrost/oneconfig/config/annotations/ConfigPage.java32
-rw-r--r--src/main/java/io/polyfrost/oneconfig/config/annotations/Option.java10
2 files changed, 37 insertions, 5 deletions
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
@@ -17,11 +17,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
*/
OptionType type();
@@ -51,6 +46,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
*/
boolean secure() default false;