Quick-fix for "Invisible chrome" bug

This commit is contained in:
Paul Chote
2010-04-09 18:23:34 +12:00
parent a78b28d394
commit a683bddfea
8 changed files with 40 additions and 37 deletions

View File

@@ -29,13 +29,13 @@ namespace OpenRA.Widgets
public int VisualHeight = 1;
public override bool HandleInput(MouseInput mi)
{
if (Game.chrome.selectedWidget == this)
if (Chrome.selectedWidget == this)
Depressed = (GetEventBounds().Contains(mi.Location.X,mi.Location.Y)) ? true : false;
// Relinquish focus
if (Game.chrome.selectedWidget == this && mi.Event == MouseInputEvent.Up)
if (Chrome.selectedWidget == this && mi.Event == MouseInputEvent.Up)
{
Game.chrome.selectedWidget = null;
Chrome.selectedWidget = null;
Depressed = false;
}
@@ -53,7 +53,7 @@ namespace OpenRA.Widgets
// We also want to play a click sound
if (mi.Event == MouseInputEvent.Down)
{
Game.chrome.selectedWidget = this;
Chrome.selectedWidget = this;
Depressed = true;
return true;
}