aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/gui
diff options
context:
space:
mode:
authorDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-06-07 17:56:57 +0200
committerDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-06-07 17:56:57 +0200
commit813f3193c6d017701948d32caa9c5b7ed07d083d (patch)
tree1a735f41ddb03a9fe501ac9f2b032e6a91cbadcc /src/main/java/cc/polyfrost/oneconfig/gui
parent48d30c844ecbd132eee3a3c53597c9853d7cd4a3 (diff)
downloadOneConfig-813f3193c6d017701948d32caa9c5b7ed07d083d.tar.gz
OneConfig-813f3193c6d017701948d32caa9c5b7ed07d083d.tar.bz2
OneConfig-813f3193c6d017701948d32caa9c5b7ed07d083d.zip
finish config system rewrite
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/gui')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java6
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigPageButton.java4
2 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
index 0ddf469..07a60ee 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
@@ -9,6 +9,7 @@ import cc.polyfrost.oneconfig.gui.elements.text.TextInputField;
import cc.polyfrost.oneconfig.gui.pages.ModsPage;
import cc.polyfrost.oneconfig.gui.pages.Page;
import cc.polyfrost.oneconfig.internal.assets.Colors;
+import cc.polyfrost.oneconfig.internal.config.OneConfigConfig;
import cc.polyfrost.oneconfig.renderer.RenderManager;
import cc.polyfrost.oneconfig.renderer.font.Fonts;
import cc.polyfrost.oneconfig.internal.assets.SVGs;
@@ -23,6 +24,7 @@ import gg.essential.universal.UScreen;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.lwjgl.input.Mouse;
+import org.lwjgl.nanovg.NanoVG;
import java.util.ArrayList;
@@ -74,6 +76,10 @@ public class OneConfigGui extends UScreen {
currentPage = new ModsPage();
parents.add(currentPage);
}
+ if (OneConfigConfig.australia) {
+ NanoVG.nvgTranslate(vg, UResolution.getWindowWidth(), UResolution.getWindowHeight());
+ NanoVG.nvgRotate(vg, (float) Math.toRadians(180));
+ }
scale = Math.min(UResolution.getWindowWidth() / 1920f, UResolution.getWindowHeight() / 1080f);
if (scale < 1)
scale = Math.min(Math.min(1f, UResolution.getWindowWidth() / 1280f), Math.min(1f, UResolution.getWindowHeight() / 800f));
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigPageButton.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigPageButton.java
index 5c7c2c4..0e6695f 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigPageButton.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigPageButton.java
@@ -20,8 +20,8 @@ public class ConfigPageButton extends BasicOption {
public final String description;
private final ColorAnimation backgroundColor = new ColorAnimation(ColorPalette.SECONDARY);
- public ConfigPageButton(Field field, Object parent, String name, String description, OptionPage page) {
- super(field, parent, name, "", "", 2);
+ public ConfigPageButton(Field field, Object parent, String name, String description, String category, String subcategory, OptionPage page) {
+ super(field, parent, name, category, subcategory, 2);
this.description = description;
this.page = page;
}