aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/polyfrost/oneconfig/test/TestNanoVGGui.java
blob: c1badc2c5f0caabc8046e4f578e9c0e1ddd579bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);
    }
}