diff options
author | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-06-16 11:01:25 +0200 |
---|---|---|
committer | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-06-16 11:01:25 +0200 |
commit | d6b6c28790d5a9d1fd991f95d5e18a26d3726650 (patch) | |
tree | 09ecc3d309a37183a091252e776ad829786aebad /src/main/java | |
parent | 8500111ec9225875c85c03692efbf2dc2c2198dc (diff) | |
download | OneConfig-d6b6c28790d5a9d1fd991f95d5e18a26d3726650.tar.gz OneConfig-d6b6c28790d5a9d1fd991f95d5e18a26d3726650.tar.bz2 OneConfig-d6b6c28790d5a9d1fd991f95d5e18a26d3726650.zip |
moony
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java | 10 | ||||
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/renderer/RenderManager.java | 6 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java index 9ae82e1..79d6b55 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java @@ -10,15 +10,18 @@ import cc.polyfrost.oneconfig.gui.pages.ModsPage; import cc.polyfrost.oneconfig.gui.pages.Page; import cc.polyfrost.oneconfig.internal.OneConfig; import cc.polyfrost.oneconfig.internal.assets.Colors; +import cc.polyfrost.oneconfig.internal.assets.SVGs; import cc.polyfrost.oneconfig.internal.config.OneConfigConfig; -import cc.polyfrost.oneconfig.libs.universal.*; +import cc.polyfrost.oneconfig.libs.universal.UKeyboard; +import cc.polyfrost.oneconfig.libs.universal.UMatrixStack; +import cc.polyfrost.oneconfig.libs.universal.UResolution; +import cc.polyfrost.oneconfig.libs.universal.UScreen; import cc.polyfrost.oneconfig.renderer.RenderManager; import cc.polyfrost.oneconfig.renderer.font.Fonts; -import cc.polyfrost.oneconfig.internal.assets.SVGs; import cc.polyfrost.oneconfig.renderer.scissor.ScissorManager; -import cc.polyfrost.oneconfig.utils.gui.GuiUtils; import cc.polyfrost.oneconfig.utils.InputUtils; import cc.polyfrost.oneconfig.utils.color.ColorPalette; +import cc.polyfrost.oneconfig.utils.gui.GuiUtils; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.lwjgl.input.Mouse; @@ -86,6 +89,7 @@ public class OneConfigGui extends UScreen { RenderManager.drawRoundedRect(vg, x + 224, y, 1056, 800, Colors.GRAY_800, Colors.CORNER_RADIUS_WIN); RenderManager.drawRoundedRect(vg, x, y, 244, 800, Colors.GRAY_800_95, Colors.CORNER_RADIUS_WIN); RenderManager.drawRect(vg, x + 224, y, 20, 800, Colors.GRAY_800); + RenderManager.drawHollowRoundRect(vg, x - 1, y - 1, 1282, 802, 0x4DCCCCCC, 20, scale < 1 ? 1 / scale : 1); } RenderManager.drawLine(vg, x + 224, y + 72, x + 1280, y + 72, 1, Colors.GRAY_700); RenderManager.drawLine(vg, x + 224, y, x + 222, y + 800, 1, Colors.GRAY_700); diff --git a/src/main/java/cc/polyfrost/oneconfig/renderer/RenderManager.java b/src/main/java/cc/polyfrost/oneconfig/renderer/RenderManager.java index 765a595..ff9a3de 100644 --- a/src/main/java/cc/polyfrost/oneconfig/renderer/RenderManager.java +++ b/src/main/java/cc/polyfrost/oneconfig/renderer/RenderManager.java @@ -17,6 +17,7 @@ import net.minecraft.client.gui.Gui; import net.minecraft.client.shader.Framebuffer; import org.lwjgl.nanovg.NVGColor; import org.lwjgl.nanovg.NVGPaint; +import org.lwjgl.opengl.Display; import org.lwjgl.opengl.GL11; import java.util.function.LongConsumer; @@ -70,10 +71,9 @@ public final class RenderManager { GL11.glDisable(GL11.GL_ALPHA_TEST); if (mcScaling) { - nvgBeginFrame(vg, (float) UResolution.getScaledWidth(), (float) UResolution.getScaledHeight(), (float) UResolution.getScaleFactor()); + nvgBeginFrame(vg, (float) UResolution.getScaledWidth(), (float) UResolution.getScaledHeight(), (float) UResolution.getScaleFactor() * Display.getPixelScaleFactor()); } else { - // If we get blurry problems with high DPI monitors, 1 might need to be replaced with Display.getPixelScaleFactor() - nvgBeginFrame(vg, UResolution.getWindowWidth(), UResolution.getWindowHeight(), 1); + nvgBeginFrame(vg, UResolution.getWindowWidth(), UResolution.getWindowHeight(), Display.getPixelScaleFactor()); } consumer.accept(vg); |