Goodbye hardcoded chrome!

This commit is contained in:
Paul Chote
2010-07-11 15:43:32 +12:00
parent 74383fee47
commit b0e1d37789
7 changed files with 61 additions and 118 deletions

View File

@@ -86,9 +86,6 @@ namespace OpenRA.Graphics
Chrome.rootWidget.OpenWindow("INGAME_ROOT");
gameWasStarted = true;
}
Game.chrome.Draw( world );
Timer.Time( "chromedraw: {0}" );
}
else
{
@@ -131,12 +128,7 @@ namespace OpenRA.Graphics
Timer.Time( "connectionState: {0}" );
}
Game.chrome.DrawWidgets(world);
if (Chrome.rootWidget.GetWidget("SERVER_LOBBY").Visible)
Game.chrome.DrawLobby();
else if (Chrome.rootWidget.GetWidget("MAP_CHOOSER").Visible)
Game.chrome.DrawMapChooser();
Game.chrome.Draw(world);
Timer.Time( "widgets: {0}" );
var cursorName = Game.chrome.HitTest(mousePos) ? "default" : Game.controller.ChooseCursor( world );