-- events for main menu


function OnLoad ()
end;


function OnEnter ()
	
end;

function OnLeave ()
end;


function OnClick (name)

	Print ("OnClick " .. name .. "\n");
	
	if (name == "Ok") then
		PopScreen ();
		return;
	end;
	

end;


function OnUpdate (tdelta)

	akey = GetActiveScreenAnimKey ();

	trans = math.sin (0.5*3.1415926535 * GetActiveScreenTransPhase ());
	SetProperty ("panel:position_offset.y", (1-trans) * 600);
	-- SetProperty ("heading:alpha", trans);
	SetProperty ("fader:alpha", trans + trans * 0.05 * math.sin (2*3.141592*akey));


end;

function OnDraw ()

end;
