--multiplayerResult

--flow_trackFinishedPosition

function multiplayerResult_reloadData()		
	--resultList_setPlayerIndex(flow_trackFinishedPosition)
	--resultList_reloadData()
end

function multiplayerResult_afterWindowOpen() 
	cfunction("showFontOverlay", "resultLevelName", 1,100,0,17)
	cfunction("setFontOverlayText", "resultLevelName", '\05'.."* "..trackData[flow_trackId][2] .." *")
	
	cfunction("showFontOverlay", "resultLevelRecord", 1,100,0,130)
	cfunction("setFontOverlayText", "resultLevelRecord", '\05'..string.format("PLAYER %d WINS", lng_WINNER))
		
	--resultList_setNumberOfOpponents(flow_arcadeNumberOfOpponents)
	--resultList_setPlayerIndex(flow_trackFinishedPosition)
	--resultList_setHeader(multiplayerResult_fontOverlayHeader)
	--resultList_setDynamic(1)
	--resultList_show()

	cfunction("enableInput", 1)
end

function multiplayerResult_onEnterState()	
	createWindowFrame("multiplayerResult_afterWindowOpen", 2.68, 15)	
end

function multiplayerResult_onLeaveState()	
	
end

function multiplayerResult_onSubmitPressed()
	cfunction("enableInput", 0)	
	--resultList_hide()
	cfunction("fadeOverlay", "resultLevelName", 100,0,250)
	cfunction("fadeOverlay", "resultLevelRecord", 100,0,250)
	cfunction("setTimer", 250, "multiplayerResult_afterTextFadeOut")
end

function multiplayerResult_afterTextFadeOut()
	closePopupWindow("multiplayerResult_afterWindowClose")
end

function multiplayerResult_afterWindowClose()
	cfunction("exitScriptSystem", UIReturnCodes["MULTIPLAYER_EXIT"])
end