Removed BaseLine and updated ButtonWidget and CheckboxWidget to use Font.TopOffset

This commit is contained in:
teinarss
2019-05-27 18:53:08 +02:00
committed by abcdefg30
parent 9982b01642
commit ab382ce4d6
10 changed files with 9 additions and 37 deletions

View File

@@ -61,7 +61,9 @@ namespace OpenRA.Mods.Common.Widgets
"checkbox";
WidgetUtils.DrawPanel(state, check);
var position = new float2(rect.Left + rect.Height * 1.5f, RenderOrigin.Y - BaseLine + (Bounds.Height - textSize.Y) / 2);
var topOffset = font.TopOffset;
var position = new float2(rect.Left + rect.Height * 1.5f, RenderOrigin.Y + (Bounds.Height - textSize.Y - topOffset) / 2);
if (Contrast)
font.DrawTextWithContrast(text, position,