Lock Stats tab until data has been gathered #27
This commit is contained in:
@@ -3,6 +3,7 @@ globalize_all_functions
|
|||||||
|
|
||||||
|
|
||||||
global string pulsePrefix
|
global string pulsePrefix
|
||||||
|
global bool pulseSuccessBool = true
|
||||||
table withMapName = {}
|
table withMapName = {}
|
||||||
void function pulsePrefixSet() //Sets our prefix
|
void function pulsePrefixSet() //Sets our prefix
|
||||||
{
|
{
|
||||||
@@ -28,10 +29,12 @@ bool function pulseRequestData(string givenURL, table parameterTable, string tab
|
|||||||
} else {
|
} else {
|
||||||
pulseData[tablepath] <- DecodedJSON
|
pulseData[tablepath] <- DecodedJSON
|
||||||
}
|
}
|
||||||
|
pulseSuccessBool = false
|
||||||
}
|
}
|
||||||
void functionref (HttpRequestFailure) onFailure = void function(HttpRequestFailure failure)
|
void functionref (HttpRequestFailure) onFailure = void function(HttpRequestFailure failure)
|
||||||
{
|
{
|
||||||
pulsePrintt("Something went wrong while getting data.")
|
pulsePrintt("Something went wrong while getting data.")
|
||||||
|
pulseSuccessBool = true
|
||||||
}
|
}
|
||||||
foreach (key, value in parameterTable)
|
foreach (key, value in parameterTable)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -540,13 +540,21 @@ void function Lobby_RefreshButtons()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void function GetStats()
|
||||||
|
{
|
||||||
|
Hud_SetLocked(file.statsButton, pulseSuccessBool)
|
||||||
|
waitthread pulseGetData()
|
||||||
|
wait 0.5 //temporary
|
||||||
|
Hud_SetLocked(file.statsButton, pulseSuccessBool)
|
||||||
|
}
|
||||||
|
|
||||||
void function OnLobbyMenu_Open()
|
void function OnLobbyMenu_Open()
|
||||||
{
|
{
|
||||||
Assert( IsConnected() )
|
Assert( IsConnected() )
|
||||||
|
|
||||||
// code will start loading DLC info from first party unless already done
|
// code will start loading DLC info from first party unless already done
|
||||||
InitDLCStore()
|
InitDLCStore()
|
||||||
waitthread pulseGetData()
|
thread GetStats()
|
||||||
|
|
||||||
thread UpdateCachedNewItems()
|
thread UpdateCachedNewItems()
|
||||||
if ( file.putPlayerInMatchmakingAfterDelay )
|
if ( file.putPlayerInMatchmakingAfterDelay )
|
||||||
|
|||||||
Reference in New Issue
Block a user