remove SpriteRenderer arg to DrawText; create only one SpriteRenderer for each Shader

This commit is contained in:
Bob
2010-04-11 20:27:32 +12:00
parent 8a3e5b8ccc
commit 0f98df9a88
15 changed files with 62 additions and 46 deletions

View File

@@ -71,7 +71,7 @@ namespace OpenRA.Widgets
var stateOffset = (Depressed) ? new int2(VisualHeight, VisualHeight) : new int2(0, 0);
WidgetUtils.DrawPanel(Depressed ? "dialog3" : "dialog2", Bounds,
() => Game.chrome.renderer.BoldFont.DrawText(Game.chrome.rgbaRenderer, Text,
() => Game.chrome.renderer.BoldFont.DrawText(Text,
new int2(Bounds.X + Bounds.Width / 2, Bounds.Y + Bounds.Height / 2)
- new int2(Game.chrome.renderer.BoldFont.Measure(Text).X / 2,
Game.chrome.renderer.BoldFont.Measure(Text).Y / 2) + stateOffset, Color.White));