Remove some unnecessary fields from chrome

This commit is contained in:
Paul Chote
2010-07-13 20:49:04 +12:00
parent 4a7c19cf93
commit 8d2693019d
6 changed files with 29 additions and 28 deletions

View File

@@ -48,13 +48,10 @@ namespace OpenRA
rootWidget = WidgetLoader.LoadWidget( widgetYaml.FirstOrDefault() );
rootWidget.Initialize();
rootWidget.InitDelegates();
Widget.WindowList.Push("MAINMENU_BG");
}
}
public static Widget rootWidget = null;
public static Widget selectedWidget;
public static ChatDisplayWidget chatWidget;
public void Tick(World world)
{
@@ -71,7 +68,7 @@ namespace OpenRA
public int2 lastMousePos;
public bool HandleInput(World world, MouseInput mi)
{
if (selectedWidget != null && selectedWidget.HandleMouseInputOuter(mi))
if (Widget.SelectedWidget != null && Widget.SelectedWidget.HandleMouseInputOuter(mi))
return true;
if (rootWidget.HandleMouseInputOuter(mi))
@@ -88,8 +85,8 @@ namespace OpenRA
public bool HandleKeyPress(System.Windows.Forms.KeyPressEventArgs e, Modifiers modifiers)
{
if (selectedWidget != null)
return selectedWidget.HandleKeyPressOuter(e, modifiers);
if (Widget.SelectedWidget != null)
return Widget.SelectedWidget.HandleKeyPressOuter(e, modifiers);
if (rootWidget.HandleKeyPressOuter(e, modifiers))
return true;
@@ -98,7 +95,7 @@ namespace OpenRA
public bool HitTest(int2 mousePos)
{
if (selectedWidget != null)
if (Widget.SelectedWidget != null)
return true;
return rootWidget.HitTest(mousePos);