aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Client/mod/scripts/vscripts/presence/ui_presence.nut
blob: 1e3819890ceb5112fd7f6de14bfddf74a9892597 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 )
		if( GetConVarString( "mp_gamemode" ) == "solo" )
		{
			NSUpdateGameStateUI( GetActiveLevel(), Localize( GetMapDisplayName( GetActiveLevel() + "_CAMPAIGN_NAME" ) ), "Campaign", "Campaign", IsFullyConnected(), false )
		}
		else
		{
			NSUpdateGameStateUI( GetActiveLevel(), Localize( GetMapDisplayName( GetActiveLevel() ) ), GetConVarString( "mp_gamemode" ), Localize( GetPlaylistDisplayName( GetConVarString( "mp_gamemode" ) ) ), IsFullyConnected(), false )
		}    
	}
}