From 230187028bc35d0402b23d304955a1720e2cb6c1 Mon Sep 17 00:00:00 2001 From: marc Date: Wed, 13 Mar 2024 18:47:22 +0100 Subject: [PATCH] implement width and height for test mod renderer --- .../voidui/testmod/impl/RendererImpl.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test-mod/src/main/java/com/neptuneclient/voidui/testmod/impl/RendererImpl.java b/test-mod/src/main/java/com/neptuneclient/voidui/testmod/impl/RendererImpl.java index b4a477c..64c96ff 100644 --- a/test-mod/src/main/java/com/neptuneclient/voidui/testmod/impl/RendererImpl.java +++ b/test-mod/src/main/java/com/neptuneclient/voidui/testmod/impl/RendererImpl.java @@ -2,6 +2,7 @@ import com.neptuneclient.voidui.rendering.Renderer; import com.neptuneclient.voidui.utils.Font; +import kotlin.Pair; import net.minecraft.client.MinecraftClient; import org.jetbrains.annotations.NotNull; import org.lwjgl.nanovg.NVGColor; @@ -64,4 +65,24 @@ public void registerFont(@NotNull Font font) { nvgCreateFontMem(vg, font.getIdentifier(), font.getData(), 1); } + @Override + public int windowWidth() { + return MinecraftClient.getInstance().getWindow().getWidth(); + } + + @Override + public int windowHeight() { + return MinecraftClient.getInstance().getWindow().getHeight(); + } + + @Override + public void text(float x, float y, @NotNull String text, @NotNull Font font, @NotNull Color color) { + + } + + @NotNull + @Override + public Pair getTextBounds(@NotNull String text, @NotNull Font font) { + return null; + } }