aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
diff options
context:
space:
mode:
authorDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-05-08 13:04:21 +0200
committerDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-05-08 13:04:21 +0200
commitb2dd5b1dd7f669a4d40a82d19c71f8eb4bdb339a (patch)
tree9f8eef6b23971c346487ad9284559904a1a67d7b /src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
parentf43ae7b1c7cd5cef73591f8e2206be1155b7f42e (diff)
downloadOneConfig-b2dd5b1dd7f669a4d40a82d19c71f8eb4bdb339a.tar.gz
OneConfig-b2dd5b1dd7f669a4d40a82d19c71f8eb4bdb339a.tar.bz2
OneConfig-b2dd5b1dd7f669a4d40a82d19c71f8eb4bdb339a.zip
scaling
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
index 240a4db..7fe7a35 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
@@ -13,6 +13,7 @@ import cc.polyfrost.oneconfig.lwjgl.font.Fonts;
import cc.polyfrost.oneconfig.lwjgl.image.Images;
import cc.polyfrost.oneconfig.utils.InputUtils;
import cc.polyfrost.oneconfig.utils.MathUtils;
+import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import org.jetbrains.annotations.NotNull;
import org.lwjgl.input.Keyboard;
@@ -38,6 +39,7 @@ public class OneConfigGui extends GuiScreen {
private final ArrayList<Page> parents = new ArrayList<>();
private ColorSelector currentColorSelector;
public boolean mouseDown;
+ private float scale = 1f;
public OneConfigGui() {
INSTANCE = this;
@@ -57,7 +59,8 @@ public class OneConfigGui extends GuiScreen {
currentPage = new HomePage();
parents.add(currentPage);
}
- //nvgScale(vg, 0.5f, 0.5f);
+ scale = Minecraft.getMinecraft().displayWidth / 1920f;
+ NanoVG.nvgScale(vg, scale, scale);
if (OneConfigConfig.ROUNDED_CORNERS) {
RenderManager.drawRoundedRect(vg, 544, 140, 1056, 800, OneConfigConfig.GRAY_800, OneConfigConfig.CORNER_RADIUS_WIN);
RenderManager.drawRoundedRect(vg, 320, 140, 244, 800, OneConfigConfig.GRAY_900_80, OneConfigConfig.CORNER_RADIUS_WIN);
@@ -220,6 +223,10 @@ public class OneConfigGui extends GuiScreen {
return color;
}
+ public float getScaleFactor() {
+ return scale;
+ }
+
public String getSearchValue() {
return textInputField.getInput();
}