Remove OnMouseDown from Widget. Define it on just the widgets that want it.

This commit is contained in:
Paul Chote
2011-07-04 02:09:31 +12:00
parent 7a69daa99c
commit bbeaf2047b
6 changed files with 46 additions and 18 deletions

View File

@@ -120,7 +120,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
var map = mapPreview.Map();
if (map == null || mi.Button != MouseButton.Left
|| orderManager.LocalClient.State == Session.ClientState.Ready)
return false;
return;
var p = map.SpawnPoints
.Select((sp, i) => Pair.New(mapPreview.ConvertToPreview(map, sp), i))
@@ -131,8 +131,6 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
var owned = orderManager.LobbyInfo.Clients.Any(c => c.SpawnPoint == p);
if (p == 0 || !owned)
orderManager.IssueOrder(Order.Command("spawn {0} {1}".F(orderManager.LocalClient.Index, p)));
return true;
};
var mapTitle = lobby.GetWidget<LabelWidget>("MAP_TITLE");