Use the font dictionary everywhere

This commit is contained in:
Paul Chote
2011-05-16 17:59:30 +12:00
parent e1c8658fdc
commit d7f009b218
17 changed files with 45 additions and 55 deletions

View File

@@ -28,7 +28,7 @@ namespace OpenRA.Mods.RA.Effects
this.color = color;
this.velocity = velocity;
s = "{0}${1}".F(value < 0 ? "-" : "+", value);
this.pos = pos - 0.5f*Game.Renderer.TinyBoldFont.Measure(s).ToFloat2();
this.pos = pos - 0.5f*Game.Renderer.Fonts["TinyBold"].Measure(s).ToFloat2();
remaining = lifetime;
}
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.RA.Effects
public IEnumerable<Renderable> Render()
{
Game.Renderer.TinyBoldFont.DrawTextWithContrast(s, pos - Game.viewport.Location, color, Color.Black,1);
Game.Renderer.Fonts["TinyBold"].DrawTextWithContrast(s, pos - Game.viewport.Location, color, Color.Black,1);
yield break;
}
}