Increase UI element sizes and add maxWidth support to DrawString methods

This commit is contained in:
Stone_Red
2026-06-15 02:10:20 +02:00
parent 43732684b3
commit 1355fa06b8
3 changed files with 19 additions and 7 deletions
+2 -2
View File
@@ -238,7 +238,7 @@ public sealed class CanvasRenderSource : IRenderSource
{
int tx = command.Position.X + (size.Width / 2) - (text.Length * 4);
int ty = command.Position.Y + (size.Height / 2) - 8;
canvas.DrawStringHeight(text, PCScreenFont.DefaultFont, fg, tx, ty, size.Height - 8);
canvas.DrawStringHeight(text, PCScreenFont.DefaultFont, fg, tx, ty, size.Height - 8, size.Width);
}
}
@@ -262,7 +262,7 @@ public sealed class CanvasRenderSource : IRenderSource
if (!string.IsNullOrEmpty(text))
{
canvas.DrawStringHeight(text, PCScreenFont.DefaultFont, fg, command.Position.X + boxSize + 5, command.Position.Y - 2, boxSize);
canvas.DrawStringHeight(text, PCScreenFont.DefaultFont, fg, command.Position.X + boxSize + 5, command.Position.Y - 2, boxSize, size.Width);
}
}
}