Fix CA2208

This commit is contained in:
RoosterDragon
2023-03-13 18:20:11 +00:00
committed by abcdefg30
parent 1b1b9dc29b
commit a120b9d37e
2 changed files with 4 additions and 2 deletions

View File

@@ -263,11 +263,10 @@ namespace OpenRA.Mods.Common.Widgets
case TextAlign.Left:
return new int2(rb.X + LeftMargin, y);
case TextAlign.Center:
default:
return new int2(rb.X + (UsableWidth - textSize.X) / 2, y);
case TextAlign.Right:
return new int2(rb.X + UsableWidth - textSize.X - RightMargin, y);
default:
throw new ArgumentOutOfRangeException("Align");
}
}