diff options
author | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-04-18 17:05:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-18 17:05:30 +0100 |
commit | 2265233e317298db1da920430b8f8c21d6e3067e (patch) | |
tree | a1339d9dfb2188100c7da55454605913d6773eb1 /src/main/java/io/polyfrost/oneconfig/test | |
parent | a0a6032206ed0326653424c580b0b2900e357f29 (diff) | |
parent | cf164be0c8f43c3d1387c9c9f7ae73c2cf1b3a02 (diff) | |
download | OneConfig-2265233e317298db1da920430b8f8c21d6e3067e.tar.gz OneConfig-2265233e317298db1da920430b8f8c21d6e3067e.tar.bz2 OneConfig-2265233e317298db1da920430b8f8c21d6e3067e.zip |
Merge pull request #3 from Wyvest/master
nanovg
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/test')
-rw-r--r-- | src/main/java/io/polyfrost/oneconfig/test/TestHud.java | 4 | ||||
-rw-r--r-- | src/main/java/io/polyfrost/oneconfig/test/TestNanoVGGui.java | 24 |
2 files changed, 26 insertions, 2 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/test/TestHud.java b/src/main/java/io/polyfrost/oneconfig/test/TestHud.java index 67f0610..9008e3d 100644 --- a/src/main/java/io/polyfrost/oneconfig/test/TestHud.java +++ b/src/main/java/io/polyfrost/oneconfig/test/TestHud.java @@ -1,7 +1,7 @@ package io.polyfrost.oneconfig.test; import io.polyfrost.oneconfig.hud.interfaces.BasicHud; -import io.polyfrost.oneconfig.renderer.Renderer; +import io.polyfrost.oneconfig.lwjgl.RenderManager; import net.minecraft.client.Minecraft; public class TestHud extends BasicHud { @@ -18,6 +18,6 @@ public class TestHud extends BasicHud { @Override public void draw(int x, int y, float scale) { - Renderer.drawScaledString("FPS: " + Minecraft.getDebugFPS(), x, y, 0xffffff, false, scale); + RenderManager.drawScaledString("FPS: " + Minecraft.getDebugFPS(), x, y, 0xffffff, false, scale); } } diff --git a/src/main/java/io/polyfrost/oneconfig/test/TestNanoVGGui.java b/src/main/java/io/polyfrost/oneconfig/test/TestNanoVGGui.java new file mode 100644 index 0000000..c1badc2 --- /dev/null +++ b/src/main/java/io/polyfrost/oneconfig/test/TestNanoVGGui.java @@ -0,0 +1,24 @@ +package io.polyfrost.oneconfig.test; + +import io.polyfrost.oneconfig.lwjgl.RenderManager; +import net.minecraft.client.gui.GuiScreen; + +import java.awt.*; + +public class TestNanoVGGui extends GuiScreen { + + @Override + public void drawScreen(int mouseX, int mouseY, float partialTicks) { + super.drawScreen(mouseX, mouseY, partialTicks); + drawRect(0, 0, width, height, Color.BLACK.getRGB()); + RenderManager.setupAndDraw((vg) -> { + RenderManager.drawRect(vg, 0, 0, 100, 100, Color.BLUE.getRGB()); + RenderManager.drawRoundedRect(vg, 305, 305, 100, 100, Color.YELLOW.getRGB(), 8); + RenderManager.drawString(vg, "Hello!", 80, 20, Color.WHITE.getRGB(), 50, "mc-regular"); + RenderManager.drawString(vg, "Hello!", 100, 100, Color.WHITE.getRGB(), 50, "inter-bold"); + RenderManager.drawImage(vg, "/assets/oneconfig/textures/hudsettings.png", 10, 10, 400, 400); + RenderManager.drawLine(vg, 0, 0, 100, 100, 7, Color.PINK.getRGB()); + }); + drawString(fontRendererObj, "Hello!", 0, 0, -1); + } +} |