require( "scripts/style.lua" );

kButtonSpacing = 45;
kButtonY = 685;

function CheckUsers()
	if (GetNumUsers() == 0) then
		gEnterNameValue = "";
		name = DoModal("scripts/entername.lua");
		if (not(name == nil)) then
			CreateNewUser(name);
			return true ;
		end
		return false ;
	else
		return true;
	end
end

function QuitGame()
	CloseWindow();
end


function TestQuitFromGame()
	result = DisplayDialog {
		"scripts/yesno.lua",
		body ="quitconfirm",
		title = "quittitle"
		};
end

function QuitFromGame()
	PostMessage( CreateNamedMessage( kQuitNow, "Quit" ) );
end


MakeDialog
{
	-- Name the modal dialog
	name="MainMenu",
	-- Bitmap
	-- {
		-- name="backgroundimage",
		-- image="backgrounds/mainmenu",
	-- },
	MainMenu
	{
		x=0,y=0,w=kMax,h=kMax,
		pane3= "backgrounds/mainmenu,0,0",
		cloudSpeed1 = 0.1,
		cloudSpeed2 = 0.5,
		
		name="mainmenuwww",
		fit=true;
		shadow ="backgrounds/sh1;0,0,1024,768;0.3;0.8",
		music= "audio/music/title_track.ogg",
		ambient = "", 
		playbutt = "play;188,626,165,73;fonts/arial.mvec;198,198,198,255;255,255,255,255;23;buttons/b_play;buttons/b_play_pressed;buttons/b_play_mouseover",
		profilebutt = "profile;355,618,141,34;fonts/arial.mvec;198,198,198,255;255,255,255,255;23;buttons/b_profiles;buttons/b_profiles_pressed;buttons/b_profiles_mouseover",
		optionbutt = "option;35,619,149,43;fonts/arial.mvec;198,198,198,255;255,255,255,255;23;buttons/b_options;buttons/b_options_pressed;buttons/b_options_mouseover;buttons/b_options",
		creditbutt = "credit;42,665,142,44;fonts/arial.mvec;198,198,198,255;255,255,255,255;23;buttons/b_credits;buttons/b_credits_pressed;buttons/b_credits_mouseover;buttons/b_credits",
		welcomebutt = "welcomeadd;695,715,250,30;fonts/arial.mvec;27,12,4,255;255,255,0,255;18;;;",
		welcometext="fonts/arial.mvec;19;675,680,290,21; 27,12,4,255",
		usernamedef="fonts/arial.mvec; 19; 675, 700, 290,23; 27,12,4,255",
		quitbutt = "quit;356,663,96,44;fonts/arial.mvec;198,198,198,255;255,255,255,255;23;buttons/b_exit;buttons/b_exit_pressed;buttons/b_exit_mouseover",
		pictsFile="backgrounds/mainmenu/title.xml",
	}
}        		   
