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/dialog",
		x=kCenter,
		y=kCenter,
        
        Button
        {
			command=
				function()
					PopModal();
					PostMessage( CreateNamedMessage( kQuitNow, "Quit" ) );
				end;
			font = StandardButtonFont,
			graphics = StandardButtonGraphics,
            close = true,
            flags = 5,
            label = "yes",
            name = "yes",
			rolloversound = "assets/audio/sfx/dialog_roll.ogg",
			sound = "assets/audio/sfx/dialog_click.ogg",
            x = 70,
            y = 250,
        },
        Button
        {
			command=
				function() 
					PopModal();
                end;
            font = StandardButtonFont,
			graphics = StandardButtonGraphics,
            close = true,
            flags = 5,
            label = "no",
            name = "no",
			rolloversound = "assets/audio/sfx/dialog_roll.ogg",
			sound = "assets/audio/sfx/dialog_click.ogg",
            x = 200,
            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=12,y=46,
			w=kMax-12,h=kMax-70,
			flags = kVAlignCenter + kHAlignCenter,
			label= gDialogTable.body,
		};
    },

} -- MakeDialog
