aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-05-30 17:47:02 +0200
committerDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-05-30 17:47:02 +0200
commit092494fd1226aa129ea88aba60fe9d6a5bf2c40e (patch)
tree1ba473dbe6bb8b8b92df9cde2de632017560a3b2 /src/main/java
parentb745fa5c04a421cc8d8979b2e4cbf6288dc4684a (diff)
downloadOneConfig-092494fd1226aa129ea88aba60fe9d6a5bf2c40e.tar.gz
OneConfig-092494fd1226aa129ea88aba60fe9d6a5bf2c40e.tar.bz2
OneConfig-092494fd1226aa129ea88aba60fe9d6a5bf2c40e.zip
new sidebar, now animations
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java7
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java88
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java34
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/ColorSelector.java2
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/pages/CreditsPage.java2
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/pages/HomePage.java12
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/lwjgl/image/SVGs.java156
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/test/TestConfig.java2
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/utils/ColorUtils.java4
9 files changed, 98 insertions, 209 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
index 75e6750..be473f9 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
@@ -6,6 +6,7 @@ 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.ModsPage;
import cc.polyfrost.oneconfig.gui.pages.Page;
import cc.polyfrost.oneconfig.libs.universal.*;
import cc.polyfrost.oneconfig.lwjgl.RenderManager;
@@ -26,7 +27,7 @@ public class OneConfigGui extends UScreen {
protected Page currentPage;
protected Page prevPage;
private float pageProgress = -224f;
- private final TextInputField textInputField = new TextInputField(248, 40, "Search...", false, false, SVGs.SEARCH);
+ private final TextInputField textInputField = new TextInputField(248, 40, "Search...", false, false, SVGs.MAGNIFYING_GLASS_BOLD);
private final ArrayList<Page> previousPages = new ArrayList<>();
private final ArrayList<Page> nextPages = new ArrayList<>();
private final BasicElement backArrow = new BasicElement(40, 40, -1, false);
@@ -68,7 +69,7 @@ public class OneConfigGui extends UScreen {
int y2 = 0;
RenderManager.setupAndDraw((vg) -> {
if (currentPage == null) {
- currentPage = new HomePage();
+ currentPage = new ModsPage();
parents.add(currentPage);
}
if (time == -1) time = UMinecraft.getTime();
@@ -94,7 +95,7 @@ public class OneConfigGui extends UScreen {
RenderManager.drawSvg(vg, SVGs.ONECONFIG, x + 19, y + 19, 42, 42);
RenderManager.drawText(vg, "OneConfig", x + 69, y + 32, OneConfigConfig.WHITE, 18f, Fonts.BOLD); // added half line height to center text
- RenderManager.drawText(vg, "ALPHA - By Polyfrost", x + 69, y + 51, OneConfigConfig.WHITE, 12f, Fonts.REGULAR);
+ RenderManager.drawText(vg, "By Polyfrost", x + 69, y + 51, OneConfigConfig.WHITE, 12f, Fonts.REGULAR);
textInputField.draw(vg, x + 1020, y + 16);
sideBar.draw(vg, x, y);
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java b/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java
index a17076b..6f474c7 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java
@@ -1,77 +1,51 @@
package cc.polyfrost.oneconfig.gui;
-import cc.polyfrost.oneconfig.config.OneConfigConfig;
import cc.polyfrost.oneconfig.gui.elements.BasicButton;
-import cc.polyfrost.oneconfig.gui.pages.HomePage;
+import cc.polyfrost.oneconfig.gui.pages.CreditsPage;
import cc.polyfrost.oneconfig.gui.pages.ModsPage;
-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 java.util.ArrayList;
-import java.util.List;
import static cc.polyfrost.oneconfig.gui.elements.BasicButton.ALIGNMENT_LEFT;
import static cc.polyfrost.oneconfig.gui.elements.BasicButton.SIZE_36;
+import static cc.polyfrost.oneconfig.utils.ColorUtils.*;
public class SideBar {
- private final List<BasicButton> btnList = new ArrayList<>();
-
- private float targetY = 0, currentY = 0;
+ private final ArrayList<BasicButton> buttons = new ArrayList<BasicButton>() {{
+ add(new BasicButton(192, SIZE_36, "Credits", SVGs.COPYRIGHT_FILL, null, ALIGNMENT_LEFT, TERTIARY));
+ add(new BasicButton(192, SIZE_36, "Global Search", SVGs.MAGNIFYING_GLASS_BOLD, null, ALIGNMENT_LEFT, TERTIARY));
+ add(new BasicButton(192, SIZE_36, "Mods", SVGs.FADERS_HORIZONTAL_BOLD, null, ALIGNMENT_LEFT, PRIMARY));
+ add(new BasicButton(192, SIZE_36, "Profiles", SVGs.USER_SWITCH_FILL, null, ALIGNMENT_LEFT, TERTIARY));
+ add(new BasicButton(192, SIZE_36, "Performance", SVGs.GAUGE_FILL, null, ALIGNMENT_LEFT, TERTIARY));
+ add(new BasicButton(192, SIZE_36, "Updates", SVGs.ARROWS_CLOCKWISE_BOLD, null, ALIGNMENT_LEFT, TERTIARY));
+ add(new BasicButton(192, SIZE_36, "Themes", SVGs.PAINT_BRUSH_BROAD_FILL, null, ALIGNMENT_LEFT, TERTIARY));
+ add(new BasicButton(192, SIZE_36, "Screenshots", SVGs.APERTURE_FILL, null, ALIGNMENT_LEFT, TERTIARY));
+ add(new BasicButton(192, SIZE_36, "Preferences", SVGs.GEAR_SIX_FILL, null, ALIGNMENT_LEFT, TERTIARY));
+ }};
+ private final BasicButton HUDButton = new BasicButton(192, SIZE_36, "Edit HUD", SVGs.NOTE_PENCIL_BOLD, null, ALIGNMENT_LEFT, SECONDARY);
+ private final BasicButton CloseButton = new BasicButton(192, SIZE_36, "Close", SVGs.X_CIRCLE_BOLD, null, ALIGNMENT_LEFT, SECONDARY_DESTRUCTIVE);
public SideBar() {
- btnList.add(new BasicButton(192, SIZE_36, "Dashboard", SVGs.DASHBOARD, null, ALIGNMENT_LEFT, ColorUtils.TERTIARY));
- btnList.get(0).setClickAction(new HomePage());
- btnList.add(new BasicButton(192, SIZE_36, "Global Search", SVGs.SEARCH, null, ALIGNMENT_LEFT, ColorUtils.TERTIARY));
- btnList.add(new BasicButton(192, SIZE_36, "Screenshots", SVGs.IMAGE, null, ALIGNMENT_LEFT, ColorUtils.TERTIARY));
- btnList.add(new BasicButton(192, SIZE_36, "Preferences", SVGs.SETTINGS, null, ALIGNMENT_LEFT, ColorUtils.TERTIARY));
- btnList.add(new BasicButton(192, 36, "Mods", SVGs.MODS, null, ALIGNMENT_LEFT, ColorUtils.TERTIARY));
- btnList.get(4).setClickAction(new ModsPage());
- btnList.add(new BasicButton(192, SIZE_36, "Performance", SVGs.PERFORMANCE, null, ALIGNMENT_LEFT, ColorUtils.TERTIARY));
- btnList.add(new BasicButton(192, SIZE_36, "Profiles", SVGs.PROFILES, null, ALIGNMENT_LEFT, ColorUtils.TERTIARY));
- btnList.add(new BasicButton(192, SIZE_36, "Updates", SVGs.UPDATE, null, ALIGNMENT_LEFT, ColorUtils.TERTIARY));
- btnList.add(new BasicButton(192, SIZE_36, "Themes Library", SVGs.THEME, null, ALIGNMENT_LEFT, ColorUtils.TERTIARY));
- btnList.add(new BasicButton(192, SIZE_36, "Themes Browser", SVGs.SEARCH, null, ALIGNMENT_LEFT, ColorUtils.TERTIARY));
- 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(() -> GuiUtils.displayScreen(null));
- btnList.add(new BasicButton(192, SIZE_36, "Minimize", SVGs.MINIMISE, null, ALIGNMENT_LEFT, ColorUtils.SECONDARY_TRANSPARENT));
- 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(() -> GuiUtils.displayScreen(new HudGui()));
+ buttons.get(0).setClickAction(new CreditsPage());
+ buttons.get(2).setClickAction(new ModsPage());
+ HUDButton.setClickAction(() -> GuiUtils.displayScreen(new HudGui()));
+ CloseButton.setClickAction(GuiUtils::closeScreen);
+ for (BasicButton button : buttons) button.setToggleable(true);
}
public void draw(long vg, int x, int y) {
- currentY = MathUtils.easeInOutCirc(50, currentY, targetY - currentY, 400);
- RenderManager.drawRoundedRect(vg, x + 16, y + currentY, 192, 36, OneConfigConfig.PRIMARY_600, OneConfigConfig.CORNER_RADIUS);
- int i = 0;
- if (targetY == 0) {
- targetY = 96;
- currentY = targetY;
- }
- for (BasicButton btn : btnList) {
- btn.draw(vg, x + 16, y + 96 + i);
- if (i >= 562) i += 44;
- else i += 36;
- if (i == 144) {
- RenderManager.drawText(vg, "MOD CONFIG", x + 16, y + 266, OneConfigConfig.WHITE_80, 12f, Fonts.SEMIBOLD);
- i = 180;
- }
- if (i == 324) {
- RenderManager.drawText(vg, "PERSONALIZATION", x + 16, y + 446, OneConfigConfig.WHITE_80, 12f, Fonts.SEMIBOLD);
- i = 360;
- }
- if (i == 504) {
- i = 562;
- }
-
- if (btn.isClicked() && btn.getPage() != null) {
- if (i < 520) targetY = btn.y - y;
- }
- }
+ buttons.get(0).draw(vg, x + 16, y + 80);
+ buttons.get(1).draw(vg, x + 16, y + 116);
+ buttons.get(2).draw(vg, x + 16, y + 192);
+ buttons.get(3).draw(vg, x + 16, y + 228);
+ buttons.get(4).draw(vg, x + 16, y + 264);
+ buttons.get(5).draw(vg, x + 16, y + 300);
+ buttons.get(6).draw(vg, x + 16, y + 376);
+ buttons.get(7).draw(vg, x + 16, y + 412);
+ buttons.get(8).draw(vg, x + 16, y + 448);
+ HUDButton.draw(vg, x + 16, y + 704);
+ CloseButton.draw(vg, x + 16, y + 748);
}
}
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 f97cde2..c2bda06 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java
@@ -75,16 +75,16 @@ public class BasicButton extends BasicElement {
this.y = y;
RenderManager.drawRoundedRect(vg, x, y, this.width, this.height, currentColor, this.cornerRadius);
float contentWidth = 0f;
- int textColor = -1;
+ int color = -1;
final float middle = x + width / 2f;
final float middleYIcon = y + height / 2f - iconSize / 2f;
final float middleYText = y + height / 2f + fontSize / 8f;
if (this.text != null) {
if (this.colorPalette == ColorUtils.TERTIARY) {
- textColor = OneConfigConfig.WHITE_80;
- if (hovered) textColor = OneConfigConfig.WHITE;
- if (clicked) textColor = OneConfigConfig.WHITE_80;
- if (page == null) textColor = OneConfigConfig.WHITE_50;
+ color = OneConfigConfig.WHITE_80;
+ if (hovered) color = OneConfigConfig.WHITE;
+ if (clicked) color = OneConfigConfig.WHITE_80;
+ if (page == null) color = OneConfigConfig.WHITE_50;
}
contentWidth += RenderManager.getTextWidth(vg, text, fontSize, Fonts.MEDIUM);
}
@@ -101,48 +101,48 @@ public class BasicButton extends BasicElement {
contentWidth += iconSize + xSpacing;
}
if (text != null) {
- RenderManager.drawText(vg, text, middle - contentWidth / 2 + (icon1 == null ? 0 : iconSize + xSpacing), middleYText, textColor, fontSize, Fonts.MEDIUM);
+ RenderManager.drawText(vg, text, middle - contentWidth / 2 + (icon1 == null ? 0 : iconSize + xSpacing), middleYText, color, fontSize, Fonts.MEDIUM);
}
if (icon1 != null) {
- RenderManager.drawSvg(vg, icon1, middle - contentWidth / 2, middleYIcon, iconSize, iconSize);
+ RenderManager.drawSvg(vg, icon1, middle - contentWidth / 2, middleYIcon, iconSize, iconSize, color);
}
if (icon2 != null) {
- RenderManager.drawSvg(vg, icon2, middle + contentWidth / 2 - iconSize, middleYIcon, iconSize, iconSize);
+ RenderManager.drawSvg(vg, icon2, middle + contentWidth / 2 - iconSize, middleYIcon, iconSize, iconSize, color);
}
this.update(x, y);
return;
}
if (alignment == ALIGNMENT_JUSTIFIED) {
if (text != null) {
- RenderManager.drawText(vg, text, middle - contentWidth / 2, middleYText, textColor, fontSize, Fonts.MEDIUM);
+ RenderManager.drawText(vg, text, middle - contentWidth / 2, middleYText, color, fontSize, Fonts.MEDIUM);
}
if (icon1 != null) {
- RenderManager.drawSvg(vg, icon1, x + xSpacing, middleYIcon, iconSize, iconSize);
+ RenderManager.drawSvg(vg, icon1, x + xSpacing, middleYIcon, iconSize, iconSize, color);
}
if (icon2 != null) {
- RenderManager.drawSvg(vg, icon2, x + width - xSpacing - iconSize, middleYIcon, iconSize, iconSize);
+ RenderManager.drawSvg(vg, icon2, x + width - xSpacing - iconSize, middleYIcon, iconSize, iconSize, color);
}
this.update(x, y);
return;
}
if (alignment == ALIGNMENT_LEFT) {
- contentWidth = xSpacing;
+ contentWidth = xPadding;
if (icon1 != null) {
- RenderManager.drawSvg(vg, icon1, x + contentWidth, middleYIcon, iconSize, iconSize);
+ RenderManager.drawSvg(vg, icon1, x + contentWidth, middleYIcon, iconSize, iconSize, color);
contentWidth += iconSize + xSpacing;
}
if (text != null) {
- RenderManager.drawText(vg, text, x + contentWidth, middleYText, textColor, fontSize, Fonts.MEDIUM);
+ RenderManager.drawText(vg, text, x + contentWidth, middleYText, color, fontSize, Fonts.MEDIUM);
contentWidth += RenderManager.getTextWidth(vg, text, fontSize, Fonts.MEDIUM) + xSpacing;
}
if (icon2 != null) {
- RenderManager.drawSvg(vg, icon2, x + contentWidth, middleYIcon, iconSize, iconSize);
+ RenderManager.drawSvg(vg, icon2, x + contentWidth, middleYIcon, iconSize, iconSize, color);
}
this.update(x, y);
return;
}
if (alignment == ALIGNMENT_RIGHT) {
- contentWidth = width - xSpacing;
+ contentWidth = width - xPadding;
if (icon2 != null) {
contentWidth -= iconSize;
RenderManager.drawSvg(vg, icon2, x + contentWidth, middleYIcon, iconSize, iconSize);
@@ -150,7 +150,7 @@ public class BasicButton extends BasicElement {
}
if (text != null) {
contentWidth -= RenderManager.getTextWidth(vg, text, fontSize, Fonts.MEDIUM);
- RenderManager.drawText(vg, text, x + contentWidth, middleYText, textColor, fontSize, Fonts.MEDIUM);
+ RenderManager.drawText(vg, text, x + contentWidth, middleYText, color, fontSize, Fonts.MEDIUM);
contentWidth -= xSpacing;
}
if (icon1 != null) {
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 db97d5f..edd145e 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/ColorSelector.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/ColorSelector.java
@@ -106,7 +106,7 @@ public class ColorSelector {
RenderManager.drawText(vg, "Color Selector", x + 16, y + 32, OneConfigConfig.WHITE_90, 18f, Fonts.SEMIBOLD);
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.drawSvg(vg, SVGs.X_CIRCLE_BOLD, x + 368, y + 16, 32, 32, closeBtn.isHovered() ? OneConfigConfig.ERROR_600 : -1);
RenderManager.setAlpha(vg, 1f);
// hex parser
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/pages/CreditsPage.java b/src/main/java/cc/polyfrost/oneconfig/gui/pages/CreditsPage.java
index 0bb94aa..218939c 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/pages/CreditsPage.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/pages/CreditsPage.java
@@ -5,7 +5,7 @@ import cc.polyfrost.oneconfig.lwjgl.font.Fonts;
import cc.polyfrost.oneconfig.lwjgl.image.SVGs;
public class CreditsPage extends Page {
- CreditsPage() {
+ public CreditsPage() {
super("Credits");
}
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 fd6e8fe..3e15e83 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/pages/HomePage.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/pages/HomePage.java
@@ -15,7 +15,7 @@ import cc.polyfrost.oneconfig.utils.NetworkUtils;
import java.awt.*;
public class HomePage extends Page {
- private final BasicButton socialsBtn = new BasicButton(184, 36, "Socials", SVGs.SHARE, SVGs.POP_OUT, BasicButton.ALIGNMENT_CENTER, ColorUtils.PRIMARY);
+ /*private final BasicButton socialsBtn = new BasicButton(184, 36, "Socials", SVGs.SHARE, SVGs.POP_OUT, BasicButton.ALIGNMENT_CENTER, ColorUtils.PRIMARY);
private final BasicButton discordBtn = new BasicButton(184, 36, "Discord", SVGs.WEBSITE, SVGs.LINK_DIAGONAL, BasicButton.ALIGNMENT_CENTER, ColorUtils.PRIMARY);
private final BasicButton webBtn = new BasicButton(184, 36, "Website", SVGs.WEBSITE, null, BasicButton.ALIGNMENT_CENTER, ColorUtils.PRIMARY);
private final BasicButton creditsBtn = new BasicButton(184, 36, "Credits", SVGs.AUDIO_PLAY, SVGs.LINK_DIAGONAL, BasicButton.ALIGNMENT_CENTER, ColorUtils.SECONDARY);
@@ -27,16 +27,16 @@ public class HomePage extends Page {
private final BasicButton button5 = new BasicButton(184, BasicButton.SIZE_36, "dhwuai", SVGs.MICROSOFT_ICON, SVGs.AUDIO_PLAY, BasicButton.ALIGNMENT_JUSTIFIED, 1);
private final BasicButton button6 = new BasicButton(184, BasicButton.SIZE_32, "yes", SVGs.MICROSOFT_ICON, SVGs.AUDIO_PLAY, BasicButton.ALIGNMENT_RIGHT, 1);
private final BasicButton button7 = new BasicButton(184, BasicButton.SIZE_32, "HELLO", SVGs.MICROSOFT_ICON, SVGs.AUDIO_PLAY, BasicButton.ALIGNMENT_CENTER, 1);
- private final BasicButton button8 = new BasicButton(184, BasicButton.SIZE_40, "HELLO", SVGs.MICROSOFT_ICON, SVGs.AUDIO_PLAY, BasicButton.ALIGNMENT_CENTER, ColorUtils.SECONDARY_DESTRUCTIVE);
+ private final BasicButton button8 = new BasicButton(184, BasicButton.SIZE_40, "HELLO", SVGs.MICROSOFT_ICON, SVGs.AUDIO_PLAY, BasicButton.ALIGNMENT_CENTER, ColorUtils.SECONDARY_DESTRUCTIVE);*/
public HomePage() {
super("Home Dashboard");
- socialsBtn.setClickAction(() -> NetworkUtils.browseLink("https://twitter.com/polyfrost"));
+ /*socialsBtn.setClickAction(() -> NetworkUtils.browseLink("https://twitter.com/polyfrost"));
discordBtn.setClickAction(() -> NetworkUtils.browseLink("https://discord.gg/4BdUuGpMdf"));
webBtn.setClickAction(() -> NetworkUtils.browseLink("https://polyfrost.cc"));
creditsBtn.setClickAction(new CreditsPage());
- guideBtn.setClickAction(() -> NetworkUtils.browseLink("https://www.youtube.com/watch?v=dQw4w9WgXcQ"));
+ guideBtn.setClickAction(() -> NetworkUtils.browseLink("https://www.youtube.com/watch?v=dQw4w9WgXcQ"));*/
}
@@ -50,7 +50,7 @@ public class HomePage extends Page {
RenderManager.drawURL(vg, "https://www.youtube.com/watch?v=dQw4w9WgXcQ", x + 100, y + 205, 24, Fonts.MEDIUM);
- discordBtn.draw(vg, x + 32, y + 658);
+ /*discordBtn.draw(vg, x + 32, y + 658);
webBtn.draw(vg, x + 232, y + 658);
socialsBtn.draw(vg, x + 432, y + 658);
creditsBtn.draw(vg, x + 632, y + 658);
@@ -66,7 +66,7 @@ public class HomePage extends Page {
button5.draw(vg, x + 100, y + 600);
button6.draw(vg, x + 350, y + 100);
button7.draw(vg, x + 350, y + 300);
- button8.draw(vg, x + 350, y + 450);
+ button8.draw(vg, x + 350, y + 450);*/
}
@Override
diff --git a/src/main/java/cc/polyfrost/oneconfig/lwjgl/image/SVGs.java b/src/main/java/cc/polyfrost/oneconfig/lwjgl/image/SVGs.java
index 76c93a4..7e6b06f 100644
--- a/src/main/java/cc/polyfrost/oneconfig/lwjgl/image/SVGs.java
+++ b/src/main/java/cc/polyfrost/oneconfig/lwjgl/image/SVGs.java
@@ -7,128 +7,44 @@ package cc.polyfrost.oneconfig.lwjgl.image;
* @see ImageLoader
*/
public enum SVGs {
- ALIGN_H_CENTER("/assets/oneconfig/icons/AlignHCenter.svg"),
- ALIGN_H_LEFT("/assets/oneconfig/icons/AlignHLeft.svg"),
- ALIGN_H_RIGHT("/assets/oneconfig/icons/AlignHRight.svg"),
- ALIGN_V_BOTTOM("/assets/oneconfig/icons/AlignVBottom.svg"),
- ALIGN_V_MIDDLE("/assets/oneconfig/icons/AlignVMiddle.svg"),
- ALIGN_V_TOP("/assets/oneconfig/icons/AlignVTop.svg"),
- ARROW_CIRCLE_DOWN("/assets/oneconfig/icons/ArrowCircleDown.svg"),
- ARROW_CIRCLE_LEFT("/assets/oneconfig/icons/ArrowCircleLeft.svg"),
- ARROW_CIRCLE_RIGHT("/assets/oneconfig/icons/ArrowCircleRight.svg"),
- ARROW_CIRCLE_UP("/assets/oneconfig/icons/ArrowCircleUp.svg"),
- ARROW_DOWN("/assets/oneconfig/icons/ArrowDown.svg"),
- ARROW_LEFT("/assets/oneconfig/icons/ArrowLeft.svg"),
- ARROW_RIGHT("/assets/oneconfig/icons/ArrowRight.svg"),
- ARROW_UP("/assets/oneconfig/icons/ArrowUp.svg"),
- AUDIO_PAUSE("/assets/oneconfig/icons/AudioPause.svg"),
- AUDIO_PLAY("/assets/oneconfig/icons/AudioPlay.svg"),
- AUDIO_PREVIOUS("/assets/oneconfig/icons/AudioPrevious.svg"),
- AUDIO_SKIP("/assets/oneconfig/icons/AudioSkip.svg"),
- BELL("/assets/oneconfig/icons/Bell.svg"),
- BELL_OFF("/assets/oneconfig/icons/BellOff.svg"),
- BOX("/assets/oneconfig/icons/Box.svg"),
- CAMERA("/assets/oneconfig/icons/Camera.svg"),
- CART("/assets/oneconfig/icons/Cart.svg"),
- CASH("/assets/oneconfig/icons/Cash.svg"),
- CASH_DOLLAR("/assets/oneconfig/icons/CashDollar.svg"),
- CHECKBOX_MIXED("/assets/oneconfig/icons/CheckboxMixed.svg"),
- CHECKBOX_TICK("/assets/oneconfig/icons/CheckboxTick.svg"),
- CHECK_CIRCLE("/assets/oneconfig/icons/CheckCircle.svg"),
- CHEVRON_DOWN("/assets/oneconfig/icons/ChevronDown.svg"),
- CHEVRON_LEFT("/assets/oneconfig/icons/ChevronLeft.svg"),
- CHEVRON_RIGHT("/assets/oneconfig/icons/ChevronRight.svg"),
- CHEVRON_UP("/assets/oneconfig/icons/ChevronUp.svg"),
- CLOCK("/assets/oneconfig/icons/Clock.svg"),
- CODE("/assets/oneconfig/icons/Code.svg"),
- COMBO_BOX_UP("/assets/oneconfig/icons/ComboBoxUp.svg"),
- COMBO_BOX_DOWN("/assets/oneconfig/icons/ComboBoxDown.svg"),
- CONTENT("/assets/oneconfig/icons/Content.svg"),
- COPY("/assets/oneconfig/icons/Copy.svg"),
- CREDIT_CARD("/assets/oneconfig/icons/CreditCard.svg"),
- CREDIT_CARD_ADD("/assets/oneconfig/icons/CreditCardAdd.svg"),
- CUBE("/assets/oneconfig/icons/Cube.svg"),
- DASHBOARD("/assets/oneconfig/icons/Dashboard.svg"),
- DELETE("/assets/oneconfig/icons/Delete.svg"),
- DOLLAR("/assets/oneconfig/icons/Dollar.svg"),
- DOLLAR_CIRCLE("/assets/oneconfig/icons/DollarCircle.svg"),
- DROPDOWN_LIST("/assets/oneconfig/icons/DropdownList.svg"), // TODO: old usage is DROPDOWN_ARROW, needs some work from developer side
- EARTH("/assets/oneconfig/icons/Earth.svg"),
- EDIT("/assets/oneconfig/icons/Edit.svg"),
- ERROR("/assets/oneconfig/icons/Error.svg"),
- EXPORT("/assets/oneconfig/icons/Export.svg"),
- EYE("/assets/oneconfig/icons/Eye.svg"),
- EYE_OFF("/assets/oneconfig/icons/EyeOff.svg"),
- FABRIC_LOADER("/assets/oneconfig/icons/FabricLoader.svg"),
- FILE("/assets/oneconfig/icons/File.svg"),
- FILTER("/assets/oneconfig/icons/Filter.svg"),
- FOLDER("/assets/oneconfig/icons/Folder.svg"),
- FORGE_LOADER("/assets/oneconfig/icons/ForgeLoader.svg"),
- HAMBURGER("/assets/oneconfig/icons/Hamburger.svg"),
- HEART_BROKEN("/assets/oneconfig/icons/HeartBroken.svg"),
- HEART_FILL("/assets/oneconfig/icons/HeartFill.svg"),
- HEART_OUTLINE("/assets/oneconfig/icons/HeartOutline.svg"),
- HELP_CIRCLE("/assets/oneconfig/icons/HelpCircle.svg"),
- HISTORY("/assets/oneconfig/icons/History.svg"),
- HOME("/assets/oneconfig/icons/Home.svg"),
- HUD("/assets/oneconfig/icons/HUD.svg"),
- HUD_SETTINGS("/assets/oneconfig/icons/HUDSettings.svg"),
- IMAGE("/assets/oneconfig/icons/Image.svg"),
- INFO_CIRCLE("/assets/oneconfig/icons/InfoCircle.svg"),
- ITEM_LINK_BROKE("/assets/oneconfig/icons/ItemLinkBroke.svg"),
- ITEM_LINKED("/assets/oneconfig/icons/ItemLinked.svg"),
- KEYSTROKE("/assets/oneconfig/icons/Keystroke.svg"),
- LAUNCH_PROFILES("/assets/oneconfig/icons/LaunchProfiles.svg"),
- LINK_DIAGONAL("/assets/oneconfig/icons/LinkDiagonal.svg"),
- LINK_HORIZONTAL("/assets/oneconfig/icons/LinkHorizontal.svg"),
- LOCATION_POINT("/assets/oneconfig/icons/LocationPoint.svg"),
- MAXIMISE("/assets/oneconfig/icons/Maximise.svg"),
- MIC("/assets/oneconfig/icons/Mic.svg"),
- MIC_OFF("/assets/oneconfig/icons/MicOff.svg"),
- MICROSOFT_ICON("/assets/oneconfig/icons/MicrosoftIcon.svg"),
- MINIMISE("/assets/oneconfig/icons/Minimise.svg"),
- MINUS_CIRCLE("/assets/oneconfig/icons/MinusCircle.svg"),
- MODS("/assets/oneconfig/icons/Mods.svg"),
- MOVE("/assets/oneconfig/icons/Move.svg"),
- NAVIGATION("/assets/oneconfig/icons/Navigation.svg"),
ONECONFIG("/assets/oneconfig/icons/OneConfig.svg"),
ONECONFIG_OFF("/assets/oneconfig/icons/OneConfigOff.svg"),
- PASTE("/assets/oneconfig/icons/Paste.svg"),
- PERFORMANCE("/assets/oneconfig/icons/Performance.svg"),
- PLUS_CIRCLE("/assets/oneconfig/icons/PlusCircle.svg"),
- POP_OUT("/assets/oneconfig/icons/PopOut.svg"),
- PROFILES("/assets/oneconfig/icons/Profiles.svg"),
- RESET("/assets/oneconfig/icons/Reset.svg"),
- SAVE("/assets/oneconfig/icons/Save.svg"),
- SEARCH("/assets/oneconfig/icons/Search.svg"),
- SEND("/assets/oneconfig/icons/Send.svg"),
- SETTINGS("/assets/oneconfig/icons/Settings.svg"),
- SHAPE_CIRCLE("/assets/oneconfig/icons/ShapeCircle.svg"),
- SHAPE_DOT("/assets/oneconfig/icons/ShapeDot.svg"),
- SHAPE_HEXAGON("/assets/oneconfig/icons/ShapeHexagon.svg"),
- SHAPE_SQUARE("/assets/oneconfig/icons/ShapeSquare.svg"),
- SHAPE_TRIANGLE("/assets/oneconfig/icons/ShapeTriangle.svg"),
- SHARE("/assets/oneconfig/icons/Share.svg"),
- SHOPPING_BAG("/assets/oneconfig/icons/ShoppingBag.svg"),
- SPACING("/assets/oneconfig/icons/Spacing.svg"),
- THEME("/assets/oneconfig/icons/Theme.svg"),
- THUMBS_DOWN("/assets/oneconfig/icons/ThumbsDown.svg"),
- THUMBS_UP("/assets/oneconfig/icons/ThumbsUp.svg"),
- UPDATE("/assets/oneconfig/icons/Update.svg"),
- VOLUME_HIGH("/assets/oneconfig/icons/VolumeHigh.svg"),
- VOLUME_MEDIUM("/assets/oneconfig/icons/VolumeMedium.svg"),
- VOLUME_LOW("/assets/oneconfig/icons/VolumeLow.svg"),
- VOLUME_NONE("/assets/oneconfig/icons/VolumeNone.svg"),
- VOLUME_MUTE("/assets/oneconfig/icons/VolumeMute.svg"),
- VOLUME_OFF("/assets/oneconfig/icons/VolumeOff.svg"),
- VOLUME_MINUS("/assets/oneconfig/icons/VolumeMinus.svg"),
- VOLUME_PLUS("/assets/oneconfig/icons/VolumePlus.svg"),
- WARNING("/assets/oneconfig/icons/Warning.svg"),
- WEBSITE("/assets/oneconfig/icons/Website.svg"),
- X_CIRCLE("/assets/oneconfig/icons/XCircle.svg"),
- X_CROSS("/assets/oneconfig/icons/XCross.svg"),
- ZOOM_IN("/assets/oneconfig/icons/ZoomIn.svg"),
- ZOOM_OUT("/assets/oneconfig/icons/ZoomOut.svg");
+ COPYRIGHT_FILL("/assets/oneconfig/icons/CopyrightFill.svg"),
+ APERTURE_FILL("/assets/oneconfig/icons/ApertureFill.svg"),
+ ARROWS_CLOCKWISE_BOLD("/assets/oneconfig/icons/ArrowsClockwiseBold.svg"),
+ FADERS_HORIZONTAL_BOLD("/assets/oneconfig/icons/FadersHorizontalBold.svg"),
+ GAUGE_FILL("/assets/oneconfig/icons/GaugeFill.svg"),
+ GEAR_SIX_FILL("/assets/oneconfig/icons/GearSixFill.svg"),
+ MAGNIFYING_GLASS_BOLD("/assets/oneconfig/icons/MagnifyingGlassBold.svg"),
+ NOTE_PENCIL_BOLD("/assets/oneconfig/icons/NotePencilBold.svg"),
+ PAINT_BRUSH_BROAD_FILL("/assets/oneconfig/icons/PaintBrushBroadFill.svg"),
+ USER_SWITCH_FILL("/assets/oneconfig/icons/UserSwitchFill.svg"),
+ X_CIRCLE_BOLD("/assets/oneconfig/icons/XCircleBold.svg"),
+
+ // OLD ICONS
+ ARROW_CIRCLE_LEFT("/assets/oneconfig/old-icons/ArrowCircleLeft.svg"),
+ ARROW_CIRCLE_RIGHT("/assets/oneconfig/old-icons/ArrowCircleRight.svg"),
+ BOX("/assets/oneconfig/old-icons/Box.svg"),
+ CHECKBOX_TICK("/assets/oneconfig/old-icons/CheckboxTick.svg"),
+ CHECK_CIRCLE("/assets/oneconfig/old-icons/CheckCircle.svg"),
+ CHEVRON_DOWN("/assets/oneconfig/old-icons/ChevronDown.svg"),
+ CHEVRON_LEFT("/assets/oneconfig/old-icons/ChevronLeft.svg"),
+ CHEVRON_RIGHT("/assets/oneconfig/old-icons/ChevronRight.svg"),
+ CHEVRON_UP("/assets/oneconfig/old-icons/ChevronUp.svg"),
+ COPY("/assets/oneconfig/old-icons/Copy.svg"),
+ DROPDOWN_LIST("/assets/oneconfig/old-icons/DropdownList.svg"),
+ ERROR("/assets/oneconfig/old-icons/Error.svg"),
+ EYE("/assets/oneconfig/old-icons/Eye.svg"),
+ EYE_OFF("/assets/oneconfig/old-icons/EyeOff.svg"),
+ HEART_FILL("/assets/oneconfig/old-icons/HeartFill.svg"),
+ HEART_OUTLINE("/assets/oneconfig/old-icons/HeartOutline.svg"),
+ HELP_CIRCLE("/assets/oneconfig/old-icons/HelpCircle.svg"),
+ HISTORY("/assets/oneconfig/old-icons/History.svg"),
+ INFO_CIRCLE("/assets/oneconfig/old-icons/InfoCircle.svg"),
+ KEYSTROKE("/assets/oneconfig/old-icons/Keystroke.svg"),
+ PASTE("/assets/oneconfig/old-icons/Paste.svg"),
+ POP_OUT("/assets/oneconfig/old-icons/PopOut.svg"),
+ WARNING("/assets/oneconfig/old-icons/Warning.svg");
public final String filePath;
diff --git a/src/main/java/cc/polyfrost/oneconfig/test/TestConfig.java b/src/main/java/cc/polyfrost/oneconfig/test/TestConfig.java
index 3e40cdc..b805fb9 100644
--- a/src/main/java/cc/polyfrost/oneconfig/test/TestConfig.java
+++ b/src/main/java/cc/polyfrost/oneconfig/test/TestConfig.java
@@ -362,7 +362,7 @@ public class TestConfig extends Config {
public static String stringTest123 = "text";
public TestConfig() {
- super(new Mod("hacks", ModType.UTIL_QOL, SVGs.CASH_DOLLAR.filePath, new VigilanceMigrator("./config/testConfig.toml")), "hacksConfig.json");
+ super(new Mod("hacks", ModType.UTIL_QOL, new VigilanceMigrator("./config/testConfig.toml")), "hacksConfig.json");
addDependency("switchTest5", () -> switchTest4);
addDependency("Test page.testDescription", () -> false);
}
diff --git a/src/main/java/cc/polyfrost/oneconfig/utils/ColorUtils.java b/src/main/java/cc/polyfrost/oneconfig/utils/ColorUtils.java
index 73fd629..88653fc 100644
--- a/src/main/java/cc/polyfrost/oneconfig/utils/ColorUtils.java
+++ b/src/main/java/cc/polyfrost/oneconfig/utils/ColorUtils.java
@@ -73,8 +73,7 @@ public final class ColorUtils {
case SECONDARY_TRANSPARENT: // Formally -2
return getColorComponents(color, new float[]{0f, 0f, 0f, 0f}, new float[]{0.9f, 0.9f, 0.9f, 0.3f}, hover, 50f);
case PRIMARY: // Formally 1
- return hover ? OneConfigConfig.PRIMARY_700 : OneConfigConfig.PRIMARY_600;
- //return getColorComponents(color, splitColor(OneConfigConfig.PRIMARY_600), splitColor(OneConfigConfig.PRIMARY_700), hover, 100f);
+ return getColorComponents(color, splitColor(OneConfigConfig.PRIMARY_700), splitColor(OneConfigConfig.PRIMARY_600), hover, 100f);
default:
case SECONDARY: // Formally 0
return getColorComponents(color, splitColor(OneConfigConfig.GRAY_500), splitColor(OneConfigConfig.GRAY_400), hover, 100f);
@@ -87,7 +86,6 @@ public final class ColorUtils {
case TERTIARY_DESTRUCTIVE:
return getColorComponents(color, splitColor(OneConfigConfig.WHITE_90), splitColor(OneConfigConfig.ERROR_300), hover, 100f);
}
-
}
/**