Kill the static widget interface

This commit is contained in:
Paul Chote
2010-04-09 18:13:11 +12:00
parent 64a6ca2ef9
commit 2fa93c74e4
9 changed files with 112 additions and 193 deletions

View File

@@ -1,4 +1,4 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
* This file is part of OpenRA.
@@ -17,20 +17,14 @@
* along with OpenRA. If not, see <http://www.gnu.org/licenses/>.
*/
#endregion
using System;
namespace OpenRA.Widgets.Delegates
{
public class MainMenuButtonsDelegate : WidgetDelegate
public class MainMenuButtonsDelegate : IWidgetDelegate
{
public override bool OnMouseUp(Widget w, MouseInput mi)
public MainMenuButtonsDelegate()
{
// Main Menu root
if (w.Id == "MAINMENU_BUTTON_QUIT")
{
Game.Exit();
return true;
}
return false;
Game.chrome.rootWidget.GetWidget("MAINMENU_BUTTON_QUIT").OnMouseUp = mi => {Game.Exit(); return true;};
}
}
}