Move OnMouseUp onto ButtonWidget and drop its unnecessary plumbing.

This commit is contained in:
Paul Chote
2011-07-04 02:52:37 +12:00
parent 8189ef109e
commit 193999a040
16 changed files with 95 additions and 203 deletions

View File

@@ -47,14 +47,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic
{
orderManager.IssueOrder(Order.Command("map " + Map.Uid));
Widget.CloseWindow();
return true;
};
bg.GetWidget<ButtonWidget>("BUTTON_CANCEL").OnMouseUp = mi =>
{
Widget.CloseWindow();
return true;
};
bg.GetWidget<ButtonWidget>("BUTTON_CANCEL").OnMouseUp = mi => Widget.CloseWindow();
scrollpanel = bg.GetWidget<ScrollPanelWidget>("MAP_LIST");
itemTemplate = scrollpanel.GetWidget<ScrollItemWidget>("MAP_TEMPLATE");