diff options
author | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-05-27 21:31:59 +0700 |
---|---|---|
committer | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-05-27 21:31:59 +0700 |
commit | ab2dd02145d5f89455a74605dd953888761d0ddb (patch) | |
tree | d8a9e909798a9bf84e876319c1fdea758d9c5963 /src/main/java/cc/polyfrost/oneconfig/gui/elements/config | |
parent | 2de9cec78992b9589c13ca24b911a1d8ce381c75 (diff) | |
download | OneConfig-ab2dd02145d5f89455a74605dd953888761d0ddb.tar.gz OneConfig-ab2dd02145d5f89455a74605dd953888761d0ddb.tar.bz2 OneConfig-ab2dd02145d5f89455a74605dd953888761d0ddb.zip |
javadoc a lot of stuff + reorganize
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/gui/elements/config')
5 files changed, 7 insertions, 8 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigButton.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigButton.java index a0ba444..3ad7f51 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigButton.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigButton.java @@ -27,7 +27,7 @@ public class ConfigButton extends BasicOption { @Override public void draw(long vg, int x, int y) { button.disable(!isEnabled()); - if(!isEnabled()) RenderManager.setAlpha(vg, 0.5f); + if (!isEnabled()) RenderManager.setAlpha(vg, 0.5f); RenderManager.drawString(vg, name, x, y + 17, OneConfigConfig.WHITE, 14f, Fonts.MEDIUM); button.draw(vg, x + (size == 1 ? 352 : 736), y); RenderManager.setAlpha(vg, 1f); @@ -39,7 +39,8 @@ public class ConfigButton extends BasicOption { } private static Runnable getRunnableFromField(Field field, Object parent) { - Runnable runnable = () -> {}; + Runnable runnable = () -> { + }; try { runnable = (Runnable) field.get(parent); } catch (IllegalAccessException e) { diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigCheckbox.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigCheckbox.java index 91c3cff..f8c34e1 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigCheckbox.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigCheckbox.java @@ -54,7 +54,8 @@ public class ConfigCheckbox extends BasicOption { RenderManager.drawRoundedRect(vg, x, y + 4, 24, 24, OneConfigConfig.PRIMARY_500, 6f); RenderManager.drawSvg(vg, SVGs.CHECKBOX_TICK, x, y + 4, 24, 24); } - if(percentOn != 0 && hover) RenderManager.drawHollowRoundRect(vg, x - 1, y + 3, 24, 24, OneConfigConfig.PRIMARY_600, 6f, 2f); + if (percentOn != 0 && hover) + RenderManager.drawHollowRoundRect(vg, x - 1, y + 3, 24, 24, OneConfigConfig.PRIMARY_600, 6f, 2f); RenderManager.setAlpha(vg, 1f); } diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigDualOption.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigDualOption.java index 08343a9..f8aa0d6 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigDualOption.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigDualOption.java @@ -4,7 +4,6 @@ import cc.polyfrost.oneconfig.config.OneConfigConfig; import cc.polyfrost.oneconfig.config.interfaces.BasicOption; import cc.polyfrost.oneconfig.lwjgl.RenderManager; import cc.polyfrost.oneconfig.lwjgl.font.Fonts; -import cc.polyfrost.oneconfig.utils.ColorUtils; import cc.polyfrost.oneconfig.utils.InputUtils; import cc.polyfrost.oneconfig.utils.MathUtils; diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigInfo.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigInfo.java index 7810d57..6564e9e 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigInfo.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigInfo.java @@ -5,15 +5,13 @@ import cc.polyfrost.oneconfig.config.data.InfoType; import cc.polyfrost.oneconfig.config.interfaces.BasicOption; import cc.polyfrost.oneconfig.lwjgl.RenderManager; import cc.polyfrost.oneconfig.lwjgl.font.Fonts; -import cc.polyfrost.oneconfig.lwjgl.image.Images; -import cc.polyfrost.oneconfig.lwjgl.image.SVGs; import cc.polyfrost.oneconfig.lwjgl.scissor.Scissor; import cc.polyfrost.oneconfig.lwjgl.scissor.ScissorManager; import java.lang.reflect.Field; public class ConfigInfo extends BasicOption { - private InfoType type; + private final InfoType type; public ConfigInfo(Field field, Object parent, String name, int size, InfoType type) { super(field, parent, name, size); diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigKeyBind.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigKeyBind.java index 905aabf..cb90165 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigKeyBind.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigKeyBind.java @@ -5,10 +5,10 @@ import cc.polyfrost.oneconfig.config.core.OneKeyBind; import cc.polyfrost.oneconfig.config.interfaces.BasicOption; import cc.polyfrost.oneconfig.gui.OneConfigGui; import cc.polyfrost.oneconfig.gui.elements.BasicButton; +import cc.polyfrost.oneconfig.libs.universal.UKeyboard; import cc.polyfrost.oneconfig.lwjgl.RenderManager; import cc.polyfrost.oneconfig.lwjgl.font.Fonts; import cc.polyfrost.oneconfig.lwjgl.image.SVGs; -import cc.polyfrost.oneconfig.libs.universal.UKeyboard; import cc.polyfrost.oneconfig.utils.ColorUtils; import java.lang.reflect.Field; |