require( "scripts/style.lua" );


local yes="yes" ;
local yesname="yes" ;
local no="no" ;	
local noname="no" ;	
local name="yesnobox";
local yescmd=gDialogTable.yes;
local nocmd=gDialogTable.no;
	
if (gDialogTable.yeslabel) then
	yes = gDialogTable.yeslabel ;
end
if (gDialogTable.nolabel) then
	no = gDialogTable.nolabel ;
end
if (gDialogTable.yesname) then
	yesname = gDialogTable.yesname;
end
if (gDialogTable.noname) then
	noname = gDialogTable.noname;
end

if (gDialogTable.name) then
	name = gDialogTable.name;
end

MakeDialog
{
	name=name, -- Remember, this is like saying table['name']=name, so it works.
    Bitmap
    {
		image="screens/title/popup/transparent.png",
		x=kCenter,
		y=kCenter,
		
		alpha=true,
		
		QuitWindow {
		
			name="QuitWindow",
			
			x=kCenter,
			y=kCenter,
			
			w=1024,
			h=768,
		
			SetStyle(MenuButtonStyle),

			Button
			{
				command=
					function()
						if (yescmd) then 
							yescmd() ; 
						end
					end;
				graphics = {
					"screens/title/popup/valid_off.png",
					"screens/title/popup/valid_on.png",
					"screens/title/popup/valid_hov.png",
				},
			    close = true,
			    flags = 5,
				name = yesname,
			    x = 550,
			    y = 400,
			},
			
			Button
			{
				command=
					function() 
						if (nocmd) then
							nocmd() ; 
						end
			        end;
			    graphics = {
					"screens/title/popup/cancel_off.png",
					"screens/title/popup/cancel_on.png",
					"screens/title/popup/cancel_hov.png",
				},
			    close = true,
			    flags = 5,
			    name = noname,
			    x = 350,
			    y = 400,
			},
        },
    },

} -- MakeDialog
