require( "scripts/style.lua" );

buty = 210;

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

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

        Button
        {
            x = 50,	y = buty,
			parent = DefaultStyle, sound = kDefaultButtonSound,
			type= kPush,
			graphics = {"buttons/yes",	"buttons/yes_on",	"buttons/yes_pick"},
			command=
				function()
					PopModal("GameMenu");
					if (not(IsToolInUse == nil)) then 
						PopModal("MainGame");
						if(not(StartLighting == nil)) then
							ProcessGameReplay();
							CSWithSh("", "scripts/maingame.lua");
						end	
					else
						PopModal("MainGame16");
						if(not(StartLighting == nil)) then
							ProcessGameReplay();
							CSWithSh("", "scripts/maingame16.lua");
						end	
					end									
						
					
					DoModal("scripts/shadow.lua");
					CloseWindow(nil);
				end;
        },
        Button
        {
            x = 230, 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
