aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/polyfrost/oneconfig/gui/SideBar.java
diff options
context:
space:
mode:
authornextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com>2022-04-23 13:51:31 +0100
committernextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com>2022-04-23 13:52:01 +0100
commita11a04cc1161a4ed55b85fa9bec877094f1e8e9d (patch)
tree423c49125b176dbabd72df562bd9b9e5f0397b02 /src/main/java/io/polyfrost/oneconfig/gui/SideBar.java
parent2b38d2d62391428a7fa40f268a4e65f876dd0e75 (diff)
downloadOneConfig-a11a04cc1161a4ed55b85fa9bec877094f1e8e9d.tar.gz
OneConfig-a11a04cc1161a4ed55b85fa9bec877094f1e8e9d.tar.bz2
OneConfig-a11a04cc1161a4ed55b85fa9bec877094f1e8e9d.zip
mod page, pages, and some more stuff
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/gui/SideBar.java')
-rw-r--r--src/main/java/io/polyfrost/oneconfig/gui/SideBar.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/gui/SideBar.java b/src/main/java/io/polyfrost/oneconfig/gui/SideBar.java
index 0b8659f..7f84049 100644
--- a/src/main/java/io/polyfrost/oneconfig/gui/SideBar.java
+++ b/src/main/java/io/polyfrost/oneconfig/gui/SideBar.java
@@ -2,6 +2,8 @@ package io.polyfrost.oneconfig.gui;
import io.polyfrost.oneconfig.config.OneConfigConfig;
import io.polyfrost.oneconfig.gui.elements.BasicButton;
+import io.polyfrost.oneconfig.gui.pages.HomePage;
+import io.polyfrost.oneconfig.gui.pages.ModsPage;
import io.polyfrost.oneconfig.lwjgl.RenderManager;
import io.polyfrost.oneconfig.lwjgl.font.Fonts;
import io.polyfrost.oneconfig.utils.MathUtils;
@@ -15,17 +17,17 @@ public class SideBar {
private float targetY = 0, currentY = 0;
public SideBar() {
- btnList.add(new BasicButton(192, 36, "Dashboard", "/assets/oneconfig/textures/share.png", null, -3, BasicButton.ALIGNMENT_LEFT));
+ btnList.add(new BasicButton(192, 36, "Dashboard", "/assets/oneconfig/textures/share.png", null, -3, BasicButton.ALIGNMENT_LEFT, new HomePage()));
btnList.add(new BasicButton(192, 36, "Global Search", "/assets/oneconfig/textures/share.png", null, -3, BasicButton.ALIGNMENT_LEFT));
- btnList.add(new BasicButton(192, 36, "Mods", "/assets/oneconfig/textures/share.png", null, -3, BasicButton.ALIGNMENT_LEFT));
+ btnList.add(new BasicButton(192, 36, "Mods", "/assets/oneconfig/textures/share.png", null, -3, BasicButton.ALIGNMENT_LEFT, new ModsPage()));
btnList.add(new BasicButton(192, 36, "Performance", "/assets/oneconfig/textures/share.png", null, -3, BasicButton.ALIGNMENT_LEFT));
btnList.add(new BasicButton(192, 36, "Profiles", "/assets/oneconfig/textures/share.png", null, -3, BasicButton.ALIGNMENT_LEFT));
btnList.add(new BasicButton(192, 36, "Updates", "/assets/oneconfig/textures/share.png", null, -3, BasicButton.ALIGNMENT_LEFT));
btnList.add(new BasicButton(192, 36, "Screenshots", "/assets/oneconfig/textures/share.png", null, -3, BasicButton.ALIGNMENT_LEFT));
btnList.add(new BasicButton(192, 36, "HUD Settings", "/assets/oneconfig/textures/share.png", null, -3, BasicButton.ALIGNMENT_LEFT));
btnList.add(new BasicButton(192, 36, "General", "/assets/oneconfig/textures/share.png", null, -3, BasicButton.ALIGNMENT_LEFT));
- btnList.add(new BasicButton(192, 36, "Close", "/assets/oneconfig/textures/share.png", null, -3, BasicButton.ALIGNMENT_LEFT));
- btnList.add(new BasicButton(192, 36, "Minimize", "/assets/oneconfig/textures/share.png", null, -3, BasicButton.ALIGNMENT_LEFT));
+ btnList.add(new BasicButton(192, 36, "Close", "/assets/oneconfig/textures/share.png", null, -1, BasicButton.ALIGNMENT_LEFT));
+ btnList.add(new BasicButton(192, 36, "Minimize", "/assets/oneconfig/textures/share.png", null, -1, BasicButton.ALIGNMENT_LEFT));
btnList.add(new BasicButton(192, 36, "Edit HUD", "/assets/oneconfig/textures/share.png", null, 0, BasicButton.ALIGNMENT_LEFT));
}
@@ -36,7 +38,7 @@ public class SideBar {
RenderManager.drawRoundedRect(vg, x + 16, currentY, 192, 36, OneConfigConfig.BLUE_600, OneConfigConfig.CORNER_RADIUS);
int i = 0;
if (targetY == 0) {
- targetY = x + 16;
+ targetY = y + 96;
currentY = targetY;
}
for (BasicButton btn : btnList) {
@@ -55,7 +57,7 @@ public class SideBar {
}
if (btn.isClicked()) {
- targetY = btn.y;
+ if(i < 520) targetY = btn.y;
}
}