aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Client
diff options
context:
space:
mode:
authorKlemmbaustein <83748124+Klemmbaustein@users.noreply.github.com>2023-09-02 18:53:06 +0200
committerGitHub <noreply@github.com>2023-09-02 18:53:06 +0200
commit9e9d7b7517e4af8df9879302d34deb93cadd9bc5 (patch)
treee5bbf0700632abada29b20f24cbebcd4b891bc6e /Northstar.Client
parent1d95b7d5f3a4b7176456c94b147f0382de04f18e (diff)
downloadNorthstarMods-9e9d7b7517e4af8df9879302d34deb93cadd9bc5.tar.gz
NorthstarMods-9e9d7b7517e4af8df9879302d34deb93cadd9bc5.zip
Changed TriggerConnectToServerCallbacks to take in an optional server for which the callback was triggered (#688)
What's the point of this
Diffstat (limited to 'Northstar.Client')
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut10
1 files changed, 8 insertions, 2 deletions
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
index c40461329..efc8d66ce 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
@@ -1274,10 +1274,16 @@ void function RemoveConnectToServerCallback( void functionref( ServerInfo ) call
file.connectCallbacks.fastremovebyvalue( callback )
}
-void function TriggerConnectToServerCallbacks()
+void function TriggerConnectToServerCallbacks( ServerInfo ornull targetServer = null )
{
+ ServerInfo server;
+ if (targetServer == null)
+ {
+ targetServer = file.lastSelectedServer
+ }
+
foreach( callback in file.connectCallbacks )
{
- callback( file.lastSelectedServer )
+ callback( expect ServerInfo( targetServer ) )
}
}