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,
		pane1= "backgrounds/mainsky,0,0",
		pane3= "backgrounds/mainmenu,0,0",
		name="mainmenuwww",
		usernamedef="fonts/arial.mvec; 23; 530, 179, 190,70; 255,255,255,255",
		fit=true;
		
		shadow ="backgrounds/sh1;0,0,1024,768;0.3;0.8",
		music= "audio/music/main_title.ogg",
		ambient = "",
		--name;rect;fontname;fontcolor;fontHighlightColor;fontsize;backImages
		aboutmoviebutt = "aboutmovie;375,277,270,54;fonts/arial.mvec;198,198,198,255;255,255,255,255;23;buttons/b_about_the_film;buttons/b_about_the_film_pressed;buttons/b_about_the_film_mouseover",
		playbutt = "play;393,351,232,54;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;414,435,190,54;fonts/arial.mvec;198,198,198,255;255,255,255,255;23;buttons/b_profile;buttons/b_profile_n;buttons/b_profile_a",
		optionbutt = "option;414,505,190,54;fonts/arial.mvec;198,198,198,255;255,255,255,255;23;buttons/b_options;buttons/b_options_n;buttons/b_options_a",
		creditbutt = "credit;414,575,190,54;fonts/arial.mvec;198,198,198,255;255,255,255,255;23;buttons/b_credits;buttons/b_credits_n;buttons/b_credits_a",
		quitbutt = "quit;414,645,190,54;fonts/arial.mvec;198,198,198,255;255,255,255,255;23;buttons/b_exit;buttons/b_exit_n;buttons/b_exit_a",
		welcomebutt = "welcomeadd;388,230,250,30;fonts/arial.mvec;198,198,198,255;255,255,255,255;18;;;",
		firtsMapPlace = "1440,1810,160,40",
		mapDrawRect = "190,0,832,768",
		mapSize="2048,3072",		
		premiereDate="06-06-2009",
		premiereTextDef="fonts/arialBold.mvec; 25; 640, 670, 380,70; 255,255,255,255",
		-- rect  ; font; fh;  color
		welcometext="fonts/arial.mvec;23;365,185,290,50; 255,255,255,255",
--			Text
--			{
--				 font = { arial, 23,   Color(255,255,255,255)},
--				 name = "welcome",
--				 x=380,y=178,w=130,h=70,
--				 flags = kHAlignRight + kVAlignCenter,
--				 label = "welcome"
--			},
	}
}
