aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/polyfrost/oneconfig/test
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-04-15 18:20:30 +0900
committerWyvest <45589059+Wyvest@users.noreply.github.com>2022-04-15 18:20:30 +0900
commit30df3e578cef533cacedf737449bbd35d4ea5d11 (patch)
tree8463196ec6ffe0162cbb636189f4e373b8a81d72 /src/main/java/io/polyfrost/oneconfig/test
parentddca3a3232eff15a7130efda03e7e5c408554412 (diff)
downloadOneConfig-30df3e578cef533cacedf737449bbd35d4ea5d11.tar.gz
OneConfig-30df3e578cef533cacedf737449bbd35d4ea5d11.tar.bz2
OneConfig-30df3e578cef533cacedf737449bbd35d4ea5d11.zip
fix shadow and add nanovg support
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/test')
-rw-r--r--src/main/java/io/polyfrost/oneconfig/test/TestNanoVGGui.java19
1 files changed, 19 insertions, 0 deletions
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..74d6a1e
--- /dev/null
+++ b/src/main/java/io/polyfrost/oneconfig/test/TestNanoVGGui.java
@@ -0,0 +1,19 @@
+package io.polyfrost.oneconfig.test;
+
+import io.polyfrost.oneconfig.lwjgl.NanoVGUtils;
+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);
+ NanoVGUtils.setupAndDraw((vg) -> {
+ NanoVGUtils.drawRect(vg, 0, 0, 300, 300, Color.BLUE.getRGB());
+ NanoVGUtils.drawRoundedRect(vg, 305, 305, 100, 100, Color.BLACK.getRGB(), 8);
+ NanoVGUtils.drawString(vg, "Hello!", 500, 500, Color.BLACK.getRGB(), 50);
+ });
+ }
+}