change CncConnectingLogic to CncConnectionLogic to match filename
This commit is contained in:
@@ -14,7 +14,7 @@ using OpenRA.Widgets;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Widgets.Logic
|
namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||||
{
|
{
|
||||||
public class CncConnectingLogic
|
public class CncConnectionLogic
|
||||||
{
|
{
|
||||||
Action onConnect, onRetry, onAbort;
|
Action onConnect, onRetry, onAbort;
|
||||||
string host;
|
string host;
|
||||||
@@ -48,7 +48,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
}
|
}
|
||||||
|
|
||||||
[ObjectCreator.UseCtor]
|
[ObjectCreator.UseCtor]
|
||||||
public CncConnectingLogic(Widget widget, string host, int port, Action onConnect, Action onRetry, Action onAbort)
|
public CncConnectionLogic(Widget widget, string host, int port, Action onConnect, Action onRetry, Action onAbort)
|
||||||
{
|
{
|
||||||
this.host = host;
|
this.host = host;
|
||||||
this.port = port;
|
this.port = port;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
Game.Settings.Save();
|
Game.Settings.Save();
|
||||||
|
|
||||||
Widget.CloseWindow();
|
Widget.CloseWindow();
|
||||||
CncConnectingLogic.Connect(ipField.Text, port, openLobby, onExit);
|
CncConnectionLogic.Connect(ipField.Text, port, openLobby, onExit);
|
||||||
};
|
};
|
||||||
|
|
||||||
panel.GetWidget<ButtonWidget>("BACK_BUTTON").OnClick = () => { Widget.CloseWindow(); onExit(); };
|
panel.GetWidget<ButtonWidget>("BACK_BUTTON").OnClick = () => { Widget.CloseWindow(); onExit(); };
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
Action onRetry = () =>
|
Action onRetry = () =>
|
||||||
{
|
{
|
||||||
CloseWindow();
|
CloseWindow();
|
||||||
CncConnectingLogic.Connect(om.Host, om.Port, onConnect, onExit);
|
CncConnectionLogic.Connect(om.Host, om.Port, onConnect, onExit);
|
||||||
};
|
};
|
||||||
|
|
||||||
Widget.OpenWindow("CONNECTIONFAILED_PANEL", new WidgetArgs()
|
Widget.OpenWindow("CONNECTIONFAILED_PANEL", new WidgetArgs()
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
{
|
{
|
||||||
var map = WidgetUtils.ChooseInitialMap(Game.Settings.Server.Map);
|
var map = WidgetUtils.ChooseInitialMap(Game.Settings.Server.Map);
|
||||||
|
|
||||||
CncConnectingLogic.Connect(IPAddress.Loopback.ToString(),
|
CncConnectionLogic.Connect(IPAddress.Loopback.ToString(),
|
||||||
Game.CreateLocalServer(map),
|
Game.CreateLocalServer(map),
|
||||||
() => OpenLobbyPanel(MenuType.Main, true),
|
() => OpenLobbyPanel(MenuType.Main, true),
|
||||||
() => { Game.CloseServer(); Menu = MenuType.Main; });
|
() => { Game.CloseServer(); Menu = MenuType.Main; });
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
var port = int.Parse(currentServer.Address.Split(':')[1]);
|
var port = int.Parse(currentServer.Address.Split(':')[1]);
|
||||||
|
|
||||||
Widget.CloseWindow();
|
Widget.CloseWindow();
|
||||||
CncConnectingLogic.Connect(host, port, openLobby, onExit);
|
CncConnectionLogic.Connect(host, port, openLobby, onExit);
|
||||||
};
|
};
|
||||||
|
|
||||||
panel.GetWidget<ButtonWidget>("BACK_BUTTON").OnClick = () => { Widget.CloseWindow(); onExit(); };
|
panel.GetWidget<ButtonWidget>("BACK_BUTTON").OnClick = () => { Widget.CloseWindow(); onExit(); };
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
// Create and join the server
|
// Create and join the server
|
||||||
Game.CreateServer(settings);
|
Game.CreateServer(settings);
|
||||||
Widget.CloseWindow();
|
Widget.CloseWindow();
|
||||||
CncConnectingLogic.Connect(IPAddress.Loopback.ToString(), Game.Settings.Server.ListenPort, onCreate, onExit);
|
CncConnectionLogic.Connect(IPAddress.Loopback.ToString(), Game.Settings.Server.ListenPort, onCreate, onExit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Container@CONNECTING_PANEL:
|
Container@CONNECTING_PANEL:
|
||||||
Id:CONNECTING_PANEL
|
Id:CONNECTING_PANEL
|
||||||
Logic:CncConnectingLogic
|
Logic:CncConnectionLogic
|
||||||
X:(WINDOW_RIGHT - WIDTH)/2
|
X:(WINDOW_RIGHT - WIDTH)/2
|
||||||
Y:(WINDOW_BOTTOM - 90)/2
|
Y:(WINDOW_BOTTOM - 90)/2
|
||||||
Width:370
|
Width:370
|
||||||
|
|||||||
Reference in New Issue
Block a user