aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/gui
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-05-27 21:31:59 +0700
committerWyvest <45589059+Wyvest@users.noreply.github.com>2022-05-27 21:31:59 +0700
commitab2dd02145d5f89455a74605dd953888761d0ddb (patch)
treed8a9e909798a9bf84e876319c1fdea758d9c5963 /src/main/java/cc/polyfrost/oneconfig/gui
parent2de9cec78992b9589c13ca24b911a1d8ce381c75 (diff)
downloadOneConfig-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')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/HudGui.java2
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java6
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java11
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java2
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicElement.java1
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/ColorSelector.java16
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java3
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/ModUpdateCard.java2
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigButton.java5
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigCheckbox.java3
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigDualOption.java1
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigInfo.java4
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigKeyBind.java2
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/text/TextInputField.java2
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/pages/HomePage.java4
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java6
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/pages/Page.java1
17 files changed, 34 insertions, 37 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/HudGui.java b/src/main/java/cc/polyfrost/oneconfig/gui/HudGui.java
index 4595725..e94ef44 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/HudGui.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/HudGui.java
@@ -3,10 +3,10 @@ package cc.polyfrost.oneconfig.gui;
import cc.polyfrost.oneconfig.config.core.ConfigCore;
import cc.polyfrost.oneconfig.hud.BasicHud;
import cc.polyfrost.oneconfig.hud.HudCore;
-import cc.polyfrost.oneconfig.lwjgl.RenderManager;
import cc.polyfrost.oneconfig.libs.universal.UKeyboard;
import cc.polyfrost.oneconfig.libs.universal.UMatrixStack;
import cc.polyfrost.oneconfig.libs.universal.UScreen;
+import cc.polyfrost.oneconfig.lwjgl.RenderManager;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
index df35ee0..5194f83 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
@@ -1,19 +1,19 @@
package cc.polyfrost.oneconfig.gui;
import cc.polyfrost.oneconfig.config.OneConfigConfig;
+import cc.polyfrost.oneconfig.config.core.OneColor;
import cc.polyfrost.oneconfig.gui.elements.BasicElement;
import cc.polyfrost.oneconfig.gui.elements.ColorSelector;
import cc.polyfrost.oneconfig.gui.elements.text.TextInputField;
import cc.polyfrost.oneconfig.gui.pages.HomePage;
import cc.polyfrost.oneconfig.gui.pages.Page;
-import cc.polyfrost.oneconfig.config.core.OneColor;
+import cc.polyfrost.oneconfig.libs.universal.*;
import cc.polyfrost.oneconfig.lwjgl.RenderManager;
import cc.polyfrost.oneconfig.lwjgl.font.Fonts;
import cc.polyfrost.oneconfig.lwjgl.image.SVGs;
import cc.polyfrost.oneconfig.lwjgl.scissor.ScissorManager;
import cc.polyfrost.oneconfig.utils.InputUtils;
import cc.polyfrost.oneconfig.utils.MathUtils;
-import cc.polyfrost.oneconfig.libs.universal.*;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.lwjgl.input.Mouse;
@@ -243,7 +243,7 @@ public class OneConfigGui extends UScreen {
}
public OneColor getColor() {
- if(currentColorSelector == null) return null;
+ if (currentColorSelector == null) return null;
return currentColorSelector.getColor();
}
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java b/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java
index 5729de3..51e5a66 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java
@@ -8,13 +8,14 @@ import cc.polyfrost.oneconfig.lwjgl.RenderManager;
import cc.polyfrost.oneconfig.lwjgl.font.Fonts;
import cc.polyfrost.oneconfig.lwjgl.image.SVGs;
import cc.polyfrost.oneconfig.utils.ColorUtils;
+import cc.polyfrost.oneconfig.utils.GuiUtils;
import cc.polyfrost.oneconfig.utils.MathUtils;
-import cc.polyfrost.oneconfig.libs.universal.UScreen;
import java.util.ArrayList;
import java.util.List;
-import static cc.polyfrost.oneconfig.gui.elements.BasicButton.*;
+import static cc.polyfrost.oneconfig.gui.elements.BasicButton.ALIGNMENT_LEFT;
+import static cc.polyfrost.oneconfig.gui.elements.BasicButton.SIZE_36;
public class SideBar {
private final List<BasicButton> btnList = new ArrayList<>();
@@ -37,11 +38,11 @@ public class SideBar {
btnList.add(new BasicButton(192, SIZE_36, "Packs Library", SVGs.BOX, null, ALIGNMENT_LEFT, ColorUtils.TERTIARY));
btnList.add(new BasicButton(192, SIZE_36, "Packs Browser", SVGs.SEARCH, null, ALIGNMENT_LEFT, ColorUtils.TERTIARY));
btnList.add(new BasicButton(192, SIZE_36, "Close", SVGs.X_CIRCLE, null, ALIGNMENT_LEFT, ColorUtils.SECONDARY_TRANSPARENT));
- btnList.get(12).setClickAction(() -> UScreen.displayScreen(null));
+ btnList.get(12).setClickAction(() -> GuiUtils.displayScreen(null));
btnList.add(new BasicButton(192, SIZE_36, "Minimize", SVGs.MINIMISE, null, ALIGNMENT_LEFT, ColorUtils.SECONDARY_TRANSPARENT));
- btnList.get(13).setClickAction(() -> UScreen.displayScreen(null));
+ btnList.get(13).setClickAction(() -> GuiUtils.displayScreen(null));
btnList.add(new BasicButton(192, SIZE_36, "Edit HUD", SVGs.HUD, null, ALIGNMENT_LEFT, ColorUtils.SECONDARY_TRANSPARENT));
- btnList.get(14).setClickAction(() -> UScreen.displayScreen(new HudGui()));
+ btnList.get(14).setClickAction(() -> GuiUtils.displayScreen(new HudGui()));
}
public void draw(long vg, int x, int y) {
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java
index 579841e..a84c290 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java
@@ -89,7 +89,7 @@ public class BasicButton extends BasicElement {
contentWidth += RenderManager.getTextWidth(vg, text, fontSize, Fonts.MEDIUM);
}
if (alignment == ALIGNMENT_CENTER) {
- if(icon1 != null && icon2 == null && text == null) {
+ if (icon1 != null && icon2 == null && text == null) {
RenderManager.drawSvg(vg, icon1, middle - iconSize / 2f, middleYIcon, iconSize, iconSize);
this.update(x, y);
return;
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicElement.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicElement.java
index f6c9e35..8b86827 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicElement.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicElement.java
@@ -1,6 +1,5 @@
package cc.polyfrost.oneconfig.gui.elements;
-import cc.polyfrost.oneconfig.gui.OneConfigGui;
import cc.polyfrost.oneconfig.lwjgl.RenderManager;
import cc.polyfrost.oneconfig.utils.ColorUtils;
import cc.polyfrost.oneconfig.utils.InputUtils;
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/ColorSelector.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/ColorSelector.java
index 4e04f5c..c734ccb 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/ColorSelector.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/ColorSelector.java
@@ -11,8 +11,8 @@ import cc.polyfrost.oneconfig.lwjgl.image.Images;
import cc.polyfrost.oneconfig.lwjgl.image.SVGs;
import cc.polyfrost.oneconfig.utils.ColorUtils;
import cc.polyfrost.oneconfig.utils.InputUtils;
-import cc.polyfrost.oneconfig.utils.NetworkUtils;
import cc.polyfrost.oneconfig.utils.MathUtils;
+import cc.polyfrost.oneconfig.utils.NetworkUtils;
import org.lwjgl.input.Mouse;
import java.awt.*;
@@ -23,7 +23,7 @@ import java.util.ArrayList;
public class ColorSelector {
private int x;
private int y;
- private OneColor color;
+ private final OneColor color;
private float percentMove = 0f;
private int mouseX, mouseY;
private final ArrayList<BasicElement> buttons = new ArrayList<>();
@@ -66,7 +66,7 @@ public class ColorSelector {
hexInput.setInput(color.getHex());
this.x = mouseX - 208;
this.y = Math.max(0, mouseY - 776);
- if(color.getDataBit() != -1) mode = 2;
+ if (color.getDataBit() != -1) mode = 2;
if (mode == 0 || mode == 2) {
this.mouseX = (int) (color.getSaturation() / 100f * 384 + x + 16);
this.mouseY = (int) (Math.abs(color.getBrightness() / 100f - 1f) * 288 + y + 120);
@@ -106,7 +106,7 @@ public class ColorSelector {
RenderManager.drawHollowRoundRect(vg, x - 3, y - 3, width + 4, height + 4, new Color(204, 204, 204, 77).getRGB(), 20f, 2f);
RenderManager.drawRoundedRect(vg, x, y, width, height, OneConfigConfig.GRAY_800, 20f);
RenderManager.drawString(vg, "Color Selector", x + 16, y + 32, OneConfigConfig.WHITE_90, 18f, Fonts.SEMIBOLD);
- if(!closeBtn.isHovered()) RenderManager.setAlpha(vg, 0.8f);
+ if (!closeBtn.isHovered()) RenderManager.setAlpha(vg, 0.8f);
closeBtn.draw(vg, x + 368, y + 16);
RenderManager.drawSvg(vg, SVGs.X_CIRCLE, x + 368, y + 16, 32, 32, closeBtn.isHovered() ? OneConfigConfig.ERROR_600 : -1);
RenderManager.setAlpha(vg, 1f);
@@ -140,10 +140,10 @@ public class ColorSelector {
// TODO favorite stuff
faveBtn.draw(vg, x + 16, y + 672);
recentBtn.draw(vg, x + 16, y + 720);
- for(int i = 0; i < 7; i++) {
+ for (int i = 0; i < 7; i++) {
favoriteColors.get(i).draw(vg, x + 104 + i * 44, y + 672);
}
- for(int i = 0; i < 7; i++) {
+ for (int i = 0; i < 7; i++) {
recentColors.get(i).draw(vg, x + 104 + i * 44, y + 720);
}
@@ -318,7 +318,7 @@ public class ColorSelector {
hueInput.setInput(String.format("%.01f", (float) color.getHue()));
hexInput.setInput("#" + color.getHex());
}
- if(guideBtn.isClicked()) NetworkUtils.browseLink("https://www.youtube.com/watch?v=dQw4w9WgXcQ");
+ if (guideBtn.isClicked()) NetworkUtils.browseLink("https://www.youtube.com/watch?v=dQw4w9WgXcQ");
// draw the color preview
@@ -388,7 +388,7 @@ public class ColorSelector {
RenderManager.drawHollowRoundRect(vg, x - 0.5f, y - 0.5f, width, height, new Color(204, 204, 204, 80).getRGB(), 8f, 1f);
RenderManager.drawHollowRoundRect(vg, currentDragPoint - 1, y - 1, 18, 18, OneConfigConfig.WHITE, 9f, 1f);
- RenderManager.drawHollowRoundRect(vg, currentDragPoint, y, 16, 16, OneConfigConfig.BLACK, 8f, 1f);
+ RenderManager.drawHollowRoundRect(vg, currentDragPoint, y, 16, 16, OneConfigConfig.BLACK, 8f, 1f);
if (color != null) {
RenderManager.drawRoundedRect(vg, currentDragPoint + 1.5f, y + 1.5f, 14, 14, color.getRGBMax(true), 7f);
}
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java
index c60286d..cc8c54d 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java
@@ -5,16 +5,15 @@ import cc.polyfrost.oneconfig.config.OneConfigConfig;
import cc.polyfrost.oneconfig.config.data.Mod;
import cc.polyfrost.oneconfig.gui.OneConfigGui;
import cc.polyfrost.oneconfig.gui.pages.ModConfigPage;
+import cc.polyfrost.oneconfig.libs.universal.wrappers.UPlayer;
import cc.polyfrost.oneconfig.lwjgl.RenderManager;
import cc.polyfrost.oneconfig.lwjgl.font.Fonts;
import cc.polyfrost.oneconfig.lwjgl.image.SVGs;
import cc.polyfrost.oneconfig.utils.ColorUtils;
import cc.polyfrost.oneconfig.utils.InputUtils;
-import cc.polyfrost.oneconfig.libs.universal.wrappers.UPlayer;
import net.minecraftforge.client.ClientCommandHandler;
import net.minecraftforge.fml.common.ModMetadata;
import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModUpdateCard.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModUpdateCard.java
index 3baf001..55041b9 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModUpdateCard.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModUpdateCard.java
@@ -1,6 +1,6 @@
package cc.polyfrost.oneconfig.gui.elements;
-public class ModUpdateCard extends BasicElement{
+public class ModUpdateCard extends BasicElement {
public ModUpdateCard(int width, int height) { // TODO
super(width, height, true);
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;
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/text/TextInputField.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/text/TextInputField.java
index 6d93be7..a7dbf62 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/text/TextInputField.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/text/TextInputField.java
@@ -2,6 +2,7 @@ package cc.polyfrost.oneconfig.gui.elements.text;
import cc.polyfrost.oneconfig.config.OneConfigConfig;
import cc.polyfrost.oneconfig.gui.elements.BasicElement;
+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;
@@ -10,7 +11,6 @@ import cc.polyfrost.oneconfig.lwjgl.scissor.ScissorManager;
import cc.polyfrost.oneconfig.utils.InputUtils;
import cc.polyfrost.oneconfig.utils.MathUtils;
import cc.polyfrost.oneconfig.utils.TextUtils;
-import cc.polyfrost.oneconfig.libs.universal.UKeyboard;
import org.jetbrains.annotations.NotNull;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/pages/HomePage.java b/src/main/java/cc/polyfrost/oneconfig/gui/pages/HomePage.java
index db19226..5892273 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/pages/HomePage.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/pages/HomePage.java
@@ -1,10 +1,10 @@
package cc.polyfrost.oneconfig.gui.pages;
import cc.polyfrost.oneconfig.config.OneConfigConfig;
+import cc.polyfrost.oneconfig.config.core.OneColor;
import cc.polyfrost.oneconfig.gui.OneConfigGui;
import cc.polyfrost.oneconfig.gui.elements.BasicButton;
import cc.polyfrost.oneconfig.gui.elements.ColorSelector;
-import cc.polyfrost.oneconfig.config.core.OneColor;
import cc.polyfrost.oneconfig.lwjgl.RenderManager;
import cc.polyfrost.oneconfig.lwjgl.font.Fonts;
import cc.polyfrost.oneconfig.lwjgl.image.SVGs;
@@ -55,7 +55,7 @@ public class HomePage extends Page {
socialsBtn.draw(vg, x + 432, y + 658);
creditsBtn.draw(vg, x + 632, y + 658);
guideBtn.draw(vg, x + 832, y + 658);
- if(socialsBtn.isClicked()) {
+ if (socialsBtn.isClicked()) {
OneConfigGui.INSTANCE.initColorSelector(new ColorSelector(new OneColor(new Color(255, 0, 255, 127)), InputUtils.mouseX(), InputUtils.mouseY()));
}
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java b/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java
index 91b8d88..1f17c7d 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java
@@ -34,7 +34,7 @@ public class ModsPage extends Page {
modCategories.add(new BasicButton(88, 32, "3rd Party", BasicButton.ALIGNMENT_CENTER, ColorUtils.SECONDARY));
modCategories.get(0).setToggled(true);
int i = 0;
- for(BasicButton button : modCategories) {
+ for (BasicButton button : modCategories) {
button.setToggleable(true);
int finalI = i;
button.setClickAction(() -> unselect(finalI));
@@ -84,7 +84,7 @@ public class ModsPage extends Page {
OneConfigConfig.favoriteMods.clear();
for (ModCard modCard : modCards) {
if (modCard.isFavorite()) OneConfigConfig.favoriteMods.add(modCard.getModData().name);
- if (modCard.getModData().config != null && modCard.getModData().config.enabled != modCard.isActive()){
+ if (modCard.getModData().config != null && modCard.getModData().config.enabled != modCard.isActive()) {
modCard.getModData().config.enabled = modCard.isActive();
modCard.getModData().config.save();
}
@@ -93,7 +93,7 @@ public class ModsPage extends Page {
}
private boolean inSelection(ModCard modCard) {
- return modCategories.get(0).isToggled() && (OneConfigConfig.allShowShortCut || !modCard.getModData().isShortCut) || (modCategories.get(1).isToggled() && modCard.getModData().modType == ModType.PVP) || (modCategories.get(2).isToggled() && modCard.getModData().modType == ModType.HUD) || (modCategories.get(3).isToggled() && modCard.getModData().modType == ModType.UTIL_QOL) || (modCategories.get(4).isToggled() && modCard.getModData().modType == ModType.HYPIXEL) || (modCategories.get(5).isToggled() && modCard.getModData().modType == ModType.SKYBLOCK) || (modCategories.get(6).isToggled() && modCard.getModData().modType == ModType.THIRD_PARTY);
+ return modCategories.get(0).isToggled() && (OneConfigConfig.allShowShortCut || !modCard.getModData().isShortCut) || (modCategories.get(1).isToggled() && modCard.getModData().modType == ModType.PVP) || (modCategories.get(2).isToggled() && modCard.getModData().modType == ModType.HUD) || (modCategories.get(3).isToggled() && modCard.getModData().modType == ModType.UTIL_QOL) || (modCategories.get(4).isToggled() && modCard.getModData().modType == ModType.HYPIXEL) || (modCategories.get(5).isToggled() && modCard.getModData().modType == ModType.SKYBLOCK) || (modCategories.get(6).isToggled() && modCard.getModData().modType == ModType.THIRD_PARTY);
}
@Override
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/pages/Page.java b/src/main/java/cc/polyfrost/oneconfig/gui/pages/Page.java
index 1fbea21..fdb5292 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/pages/Page.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/pages/Page.java
@@ -1,6 +1,5 @@
package cc.polyfrost.oneconfig.gui.pages;
-import cc.polyfrost.oneconfig.gui.OneConfigGui;
import cc.polyfrost.oneconfig.lwjgl.scissor.Scissor;
import cc.polyfrost.oneconfig.lwjgl.scissor.ScissorManager;
import cc.polyfrost.oneconfig.utils.MathUtils;