require( "scripts/style.lua" );

buty = 270;

MakeDialog
{
    Bitmap
    {
		image="backgrounds/yes_no",
		x=kCenter, 	y=kCenter-40,

		Text
		{
			parent=DefaultStyle,
			font = { arialFont, 26,   Color(255,255,255,255)},
			flags = kVAlignCenter + kHAlignCenter,
			x=30,y=26,w=kMax-30,h=kMax-100,
			label= "gameAsk2Menu",
		};

        Button
        {
            x = 60,	y = buty,
			parent = DefaultStyle, sound = kDefaultButtonSound,
			type= kPush,
			graphics = {"buttons/yes",	"buttons/yes_on",	"buttons/yes_pick"},
			command=
				function()
					PopModal("GameMenu");
					if(not(StartLighting == nil)) then
						ProcessGameClose();
						if(not(StartSoundFade == nil)) then StartSoundFade(); end
						CSWithSh("MainGame", "scripts/mainmenu.lua");
					end	
					DoModal("scripts/shadow.lua");
					CloseWindow(nil);
				end;
        },
        Button
        {
            x = 200, y = buty,
			parent = DefaultStyle, sound = kDefaultButtonSound,
			type= kPush,
			graphics = {"buttons/no",	"buttons/no_on",	"buttons/no_pick"},
			command=
				function() 
					if(not(StartLighting == nil)) then
						StartLighting();
					end	
					CloseWindow(nil);
                end;
        },
        
    },

} -- MakeDialog
