aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Client/mod/scripts/vscripts/state_ui.nut
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.Client/mod/scripts/vscripts/state_ui.nut')
-rw-r--r--Northstar.Client/mod/scripts/vscripts/state_ui.nut29
1 files changed, 29 insertions, 0 deletions
diff --git a/Northstar.Client/mod/scripts/vscripts/state_ui.nut b/Northstar.Client/mod/scripts/vscripts/state_ui.nut
new file mode 100644
index 00000000..907e38fa
--- /dev/null
+++ b/Northstar.Client/mod/scripts/vscripts/state_ui.nut
@@ -0,0 +1,29 @@
+untyped
+
+globalize_all_functions
+
+void function NSUpdateGameStateUIStart()
+{
+ thread NSUpdateGameStateLoopUI()
+}
+
+void function NSUpdateGameStateLoopUI()
+{
+ while ( true )
+ {
+ wait 1.0
+ if ( uiGlobal.loadedLevel == "" )
+ {
+ if ( uiGlobal.isLoading )
+ NSSetLoading( true )
+ else
+ {
+ NSSetLoading( false )
+ NSUpdateGameStateUI( "", "", "", "", true, false )
+ }
+ continue
+ }
+ NSSetLoading( false )
+ NSUpdateGameStateUI( GetActiveLevel(), Localize( GetMapDisplayName( GetActiveLevel() ) ), GetConVarString( "mp_gamemode" ), Localize( GetPlaylistDisplayName( GetConVarString("mp_gamemode") ) ), IsFullyConnected(), false )
+ }
+} \ No newline at end of file