work on #993 -- removed OnMouseUp from ConnectionDialogsLogic.cs

This commit is contained in:
Chris Forbes
2011-07-08 20:52:31 +12:00
committed by Paul Chote
parent 8e780759bf
commit c32e0186b9

View File

@@ -21,7 +21,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
[ObjectCreator.Param] string host, [ObjectCreator.Param] string host,
[ObjectCreator.Param] int port ) [ObjectCreator.Param] int port )
{ {
widget.GetWidget<ButtonWidget>("CONNECTION_BUTTON_ABORT").OnMouseUp = mi => { widget.GetWidget<ButtonWidget>("CONNECTION_BUTTON_ABORT").OnClick = () => {
widget.GetWidget("CONNECTION_BUTTON_ABORT").Parent.Visible = false; widget.GetWidget("CONNECTION_BUTTON_ABORT").Parent.Visible = false;
Game.Disconnect(); Game.Disconnect();
Game.LoadShellMap(); Game.LoadShellMap();
@@ -41,14 +41,14 @@ namespace OpenRA.Mods.RA.Widgets.Logic
[ObjectCreator.Param] Widget widget, [ObjectCreator.Param] Widget widget,
[ObjectCreator.Param] OrderManager orderManager) [ObjectCreator.Param] OrderManager orderManager)
{ {
widget.GetWidget<ButtonWidget>("CONNECTION_BUTTON_CANCEL").OnMouseUp = mi => { widget.GetWidget<ButtonWidget>("CONNECTION_BUTTON_CANCEL").OnClick = () => {
widget.GetWidget("CONNECTION_BUTTON_CANCEL").Parent.Visible = false; widget.GetWidget("CONNECTION_BUTTON_CANCEL").Parent.Visible = false;
Game.Disconnect(); Game.Disconnect();
Game.LoadShellMap(); Game.LoadShellMap();
Widget.CloseWindow(); Widget.CloseWindow();
Widget.OpenWindow("MAINMENU_BG"); Widget.OpenWindow("MAINMENU_BG");
}; };
widget.GetWidget<ButtonWidget>("CONNECTION_BUTTON_RETRY").OnMouseUp = mi => widget.GetWidget<ButtonWidget>("CONNECTION_BUTTON_RETRY").OnClick = () =>
Game.JoinServer(orderManager.Host, orderManager.Port); Game.JoinServer(orderManager.Host, orderManager.Port);
widget.GetWidget<LabelWidget>("CONNECTION_FAILED_DESC").GetText = () => string.IsNullOrEmpty(orderManager.ServerError) ? widget.GetWidget<LabelWidget>("CONNECTION_FAILED_DESC").GetText = () => string.IsNullOrEmpty(orderManager.ServerError) ?