Remove obsolete Bold field from widgets

This commit is contained in:
Paul Chote
2011-05-22 13:30:52 +12:00
parent 8eb4e663d2
commit 35673a058a
13 changed files with 112 additions and 138 deletions

View File

@@ -39,15 +39,12 @@ namespace OpenRA.Widgets
public Color DisabledColor = Color.Gray;
public string Font = "Regular";
[Obsolete] public bool Bold = false;
public TextFieldWidget() : base() {}
protected TextFieldWidget(TextFieldWidget widget)
: base(widget)
{
Text = widget.Text;
MaxLength = widget.MaxLength;
Bold = widget.Bold;
Font = widget.Font;
TextColor = widget.TextColor;
DisabledColor = widget.DisabledColor;
@@ -86,9 +83,6 @@ namespace OpenRA.Widgets
public int ClosestCursorPosition(int x)
{
if (Font == "Regular" && Bold)
Font = "Bold";
var font = Game.Renderer.Fonts[Font];
var textSize = font.Measure(Text);
@@ -200,9 +194,6 @@ namespace OpenRA.Widgets
public virtual void DrawWithString(string text)
{
if (Font == "Regular" && Bold)
Font = "Bold";
var font = Game.Renderer.Fonts[Font];
var pos = RenderOrigin;