This commit is contained in:
maxwes08
2026-05-25 09:44:23 +02:00
parent e1778fb446
commit 38db4ce6b9
7 changed files with 13 additions and 10 deletions

View File

@@ -3,12 +3,9 @@ public static class CharWidth
private static readonly Dictionary<char, float> CharWidths = new Dictionary<char, float>();
static CharWidth()
{
// Default for all ASCII
for (char c = (char)32; c <= (char)126; c++)
{ for (char c = (char)32; c <= (char)126; c++)
CharWidths[c] = 5.0f;
// Override exceptions
CharWidths[' '] = 3.0f;
CharWidths['!'] = 1.0f;
CharWidths['"'] = 3.0f;

View File

@@ -28,7 +28,6 @@ public class GuiBatcher
public void DrawQuad(float x, float y, float w, float h, Vector4 uv, Vector4 color)
{
// Two triangles (Standard Minecraft Blit)
_vertices.Add(new UiVertex(x, y, uv.X, uv.Y, color)); // TL
_vertices.Add(new UiVertex(x + w, y, uv.Z, uv.Y, color)); // TR
_vertices.Add(new UiVertex(x, y + h, uv.X, uv.W, color)); // BL