public static void Connect(string host, int port, string password, Action onConnect, Action onAbort) { WarGame.JoinServer(host, port, password); Action <string> onRetry = newPassword => Connect(host, port, newPassword, onConnect, onAbort); UI.OpenWindow("CONNECTING_PANEL", new WidgetArgs() { { "host", host }, { "port", port }, { "onConnect", onConnect }, { "onAbort", onAbort }, { "onRetry", onRetry }, }); }