aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/polyfrost/oneconfig/config
diff options
context:
space:
mode:
authorDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-04-29 17:27:45 +0200
committerDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-04-29 17:27:45 +0200
commit86f6f3e8c3ae91ddbc29985f73e1d4f29f0a4b17 (patch)
tree36a7e8aafc3d29a844f611211b3d1f06ee48e7e8 /src/main/java/io/polyfrost/oneconfig/config
parent117d80ff0e343eecf260fd363db896166d8061d7 (diff)
downloadOneConfig-86f6f3e8c3ae91ddbc29985f73e1d4f29f0a4b17.tar.gz
OneConfig-86f6f3e8c3ae91ddbc29985f73e1d4f29f0a4b17.tar.bz2
OneConfig-86f6f3e8c3ae91ddbc29985f73e1d4f29f0a4b17.zip
text box config done
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/config')
-rw-r--r--src/main/java/io/polyfrost/oneconfig/config/annotations/Option.java5
-rw-r--r--src/main/java/io/polyfrost/oneconfig/config/data/OptionType.java4
-rw-r--r--src/main/java/io/polyfrost/oneconfig/config/interfaces/BasicOption.java14
-rw-r--r--src/main/java/io/polyfrost/oneconfig/config/interfaces/Config.java2
4 files changed, 7 insertions, 18 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 4cda7d5..d9bdbb7 100644
--- a/src/main/java/io/polyfrost/oneconfig/config/annotations/Option.java
+++ b/src/main/java/io/polyfrost/oneconfig/config/annotations/Option.java
@@ -42,11 +42,6 @@ public @interface Option {
int size() default 1;
/**
- * The placeholder for the text box if there is no text inside
- */
- String placeholder() default "";
-
- /**
* If the text field is secure or not
*/
boolean secure() default false;
diff --git a/src/main/java/io/polyfrost/oneconfig/config/data/OptionType.java b/src/main/java/io/polyfrost/oneconfig/config/data/OptionType.java
index 61bb516..ef0a730 100644
--- a/src/main/java/io/polyfrost/oneconfig/config/data/OptionType.java
+++ b/src/main/java/io/polyfrost/oneconfig/config/data/OptionType.java
@@ -15,6 +15,10 @@ public enum OptionType {
CHECKBOX,
DUAL_OPTION,
ARROW_SELECTOR,
+ /**
+ * Type: String
+ * Normal: 1x and 2x, Secure and Mutliline: 2x only
+ */
TEXT,
SLIDER,
COLOR,
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 5b6e2c0..7c9771c 100644
--- a/src/main/java/io/polyfrost/oneconfig/config/interfaces/BasicOption.java
+++ b/src/main/java/io/polyfrost/oneconfig/config/interfaces/BasicOption.java
@@ -55,22 +55,12 @@ public abstract class BasicOption {
public abstract void draw(long vg, int x, int y);
/**
- * Function that gets called when mouse is clicked
- *
- * @param mouseX x position of mouse
- * @param mouseY y position of mouse
- * @param mouseButton button that got pressed
- */
- protected void onMouseClicked(int mouseX, int mouseY, int mouseButton) {
- }
-
- /**
* Function that gets called when a key is typed
*
- * @param typedChar char that has been typed
+ * @param key char that has been typed
* @param keyCode code of key
*/
- protected void keyTyped(char typedChar, int keyCode) {
+ 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 37114cf..0cade35 100644
--- a/src/main/java/io/polyfrost/oneconfig/config/interfaces/Config.java
+++ b/src/main/java/io/polyfrost/oneconfig/config/interfaces/Config.java
@@ -98,7 +98,7 @@ public class Config {
options.add(new ConfigCheckbox(field, option.name(), option.size()));
break;
case TEXT:
- options.add(new ConfigTextBox(field, option.name(), option.size(), option.placeholder(), option.secure(), option.multiLine()));
+ options.add(new ConfigTextBox(field, option.name(), option.size(), option.secure(), option.multiLine()));
}
}
}