require( "scripts/style.lua" );


local yes="yes" ;
local no="no" ;	

if (gDialogTable.yeslabel) then
	yes = gDialogTable.yeslabel ;
end
if (gDialogTable.nolabel) then
	no = gDialogTable.nolabel ;
end

MakeDialog
{
    Bitmap
    {
        name="yesnobackground",
		image="backgrounds/popup",
		x=kCenter,
		y=kCenter,
        
        Button
        {
			command=
				function()
					if (gDialogTable.yes) then 
						gDialogTable.yes() ; 
					end
				end;
			font = StandardButtonFont,
			graphics = StandardButtonGraphics,
            close = true,
            flags = 5,
            label = yes,
            name = "yes",
            x = 45,
            y = 250,
        },
        Button
        {
			command=
				function() 
					if (gDialogTable.no) then
						gDialogTable.no() ; 
					end
                end;
            font = StandardButtonFont,
			graphics = StandardButtonGraphics,
            close = true,
            flags = 5,
            label = no,
            name = "no",
            x = 225,
            y = 250,
        },
        
        Text
		{
			font = DialogTitleFont,
			name = "yesnotitle",
			x=12, y=8,
			w=kMax,h=40,
			flags = kVAlignCenter + kHAlignLeft,
			label= gDialogTable.title,
		};
		
		Text
		{
			font = DialogBodyFont,
			name = "yesnobody",
			x=30,y=46,
			w=kMax-30,h=kMax-70,
			flags = kVAlignCenter + kHAlignCenter,
			label= gDialogTable.body,
		};
    },

} -- MakeDialog
