Replace Rectangle widget bounds with a new WidgetBounds struct.

This commit is contained in:
Paul Chote
2023-10-31 17:06:34 +00:00
committed by Pavel Penev
parent 31c37662cf
commit 03b413a892
7 changed files with 47 additions and 29 deletions

View File

@@ -78,7 +78,7 @@ namespace OpenRA.Mods.Common.Widgets
foreach (var t in texts)
{
var textSize = font.Measure(t.Text);
var location = new float2(Bounds.Location) + new float2(0, y);
var location = new float2(Bounds.X, Bounds.Y + y);
if (Align == TextAlign.Center)
location += new int2((Bounds.Width - textSize.X) / 2, 0);