Fix cursor interaction with widgets

This commit is contained in:
Paul Chote
2010-07-20 23:51:55 +12:00
parent 5abe52607d
commit bd69047e8c
7 changed files with 24 additions and 30 deletions

View File

@@ -69,7 +69,7 @@ namespace OpenRA.Graphics
Game.chrome.Draw(world);
Timer.Time( "widgets: {0}" );
var cursorName = Game.chrome.HitTest(mousePos) ? "default" : Game.controller.ChooseCursor( world );
var cursorName = Chrome.rootWidget.GetCursorOuter(mousePos) ?? Game.controller.ChooseCursor( world );
var c = new Cursor(cursorName);
cursorRenderer.DrawSprite(c.GetSprite((int)cursorFrame), mousePos + Location - c.GetHotspot(), "cursor");
Timer.Time( "cursors: {0}" );