Skip to content

Commit

Permalink
implement width and height for test mod renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
Hobbyshop committed Mar 13, 2024
1 parent 003ef98 commit 2301870
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<Float, Float> getTextBounds(@NotNull String text, @NotNull Font font) {
return null;
}
}

0 comments on commit 2301870

Please sign in to comment.