require( "scripts/style.lua" );


local yes="yes" ;
local yesname="yes" ;
local no="no" ;	
local noname="no" ;	
local name="yesnobox";
	
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="backgrounds/dialog",
		x=kCenter,
		y=kCenter,

		Bitmap
		{
			image="buttons/gamemode1";
			x=kCenter,
			y=kCenter
		};
		
--		SetStyle(DialogTitleText),
--      Text
--		{
--			name = "yesnotitle",
--			label= gDialogTable.title,
--		};
		
--		SetStyle(DialogBodyText),
--		Text
--		{
--			name = "yesnobody",
--			label= gDialogTable.body,
--		};
		
		Bitmap
		{
			image="backgrounds/header_mode",
			x=20,
			y=28
		};

        SetStyle(ModeButtonTimedStyle),
        Button
        {
			command=
				function()
					if (gDialogTable.yes) then 
						gDialogTable.yes() ; 
					end
				end;
            close = true,
--          flags = 5,
			flags = 0,
            name = yesname,
			x = 50,
			y = 83
        };
        
        SetStyle(ModeButtonFreeStyle),
        Button
        {
			command=
				function() 
					if (gDialogTable.no) then
						gDialogTable.no() ; 
					end
                end;
            close = true,
--          flags = 5,
			flags = 0,
            name = noname,
			x = 50,
			y = 164
        };
        
    },

} -- MakeDialog
