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/profiles/del/back",
		x=kCenter,
		y=kCenter-50,

		Text
		{
			parent=DefaultStyle,
			font = {  "fonts/lithos.mvec",  30,  Color(88,76,46,255) },
			flags = kVAlignCenter + kHAlignCenter,
			x=30,y=26,w=kMax-40,h=kMax-100,
			name = "yesnobody",
			label= gDialogTable.body,
		};

        Button
        {
			parent = DefaultStyle,
			type= kPush,
			graphics = {"backgrounds/profiles/del/b_yes",	"backgrounds/profiles/del/b_yes_pressed",	"backgrounds/profiles/del/b_yes_mouseover"},
			command=
				function()
					PlayGSound("butt");
					if (gDialogTable.yes) then 
						gDialogTable.yes() ; 
					end
				end;
            close = true,
            flags = 45,
            name = yesname,
            x = 50,
			y = 185,
        },

        Button
        {
			parent = DefaultStyle,
			type= kPush,
			graphics = {"backgrounds/profiles/del/b_no",	"backgrounds/profiles/del/b_no_pressed",	"backgrounds/profiles/del/b_no_mouseover"},
			command=
				function() 
					PlayGSound("butt");
					if (gDialogTable.no) then
						gDialogTable.no() ; 
					end
                end;
            close = true,
            flags = 5,
            name = noname,
            x = 250,
            y = 185,
        },
        
    },

} -- MakeDialog
