
function challengeObjectives_onCancelPressed()			
	challengeObjectives_onSubmitPressed()	
end

function challengeObjectives_afterWindowClose()	
	cfunction("transitionToState", "pauseState")
end

function challengeObjectives_onSubmitPressed()
	cfunction("enableInput", 0)
	cfunction("showFontOverlay", "menu_content", 0, 100, 0, 112)
	cfunction("startSoundSample", "back_sfx", 1, 100)		
	closePopupWindow("challengeObjectives_afterWindowClose")	
		
end

function challengeObjectives_onEnterState()		
	cfunction("enableInput", 0)
	openPopupWindow("challengeObjectives_afterWindowOpen", 1.8)	
	
	
end

function challengeObjectives_afterWindowOpen()	
	cfunction("enableInput", 1)
	if flow_challengeId == challengeModes['CRITICALDAMAGE'] then
		cfunction("showFontOverlay", "menu_content", 1, 100, 0, 93)
		cfunction("setFontOverlayText", "menu_content", '\05'..lng_CHALLOBJECTCONTENT1)
	elseif flow_challengeId == challengeModes['LOWENERGY'] then
		cfunction("showFontOverlay", "menu_content", 1, 100, 0, 100)
		cfunction("setFontOverlayText", "menu_content", '\05'..lng_CHALLOBJECTCONTENT2)
	elseif flow_challengeId == challengeModes['TIMEGATES'] then
		cfunction("showFontOverlay", "menu_content", 1, 100, 0, 100)
		cfunction("setFontOverlayText", "menu_content", '\05'..lng_CHALLOBJECTCONTENT3)
	else
		cfunction("showFontOverlay", "menu_content", 1, 100, 0, 112)
		cfunction("setFontOverlayText", "menu_content", '\05'..lng_CHALLOBJECTTITLE)
		cfunction("debugPrintF", "Wrong Challenge ID (flow_challengeId) ", flow_challengeId)	
	end	
end

function challengeObjectives_onLeaveState()				
end
