require( "scripts/style.lua" );

MakeDialog
{
	name="quittomainmenu", -- Remember, this is like saying table['name']=name, so it works.
    Bitmap
    {
		image="backgrounds/popup_bg",
		x=311,
		y=230,
		fit=true,

        Text
		{
			name = "yesnotitle",
			x = 20,
			y = 8,
			w = 372,
			h = 46,
			font = {
				oldsansblackFont,
				40,
				RedTextColor
			},
			flags = kVAlignCenter;
			label= gDialogTable.title,
		};
		
		Text
		{
			name = "yesnobody",
			x = 12,
			y = 55,
			w = 378,
			h = 200,
			font = {
				oldsansblackFont,
				30,
				BlackColor
			},
			flags = kHAlignCenter + kVAlignCenter;
			label= gDialogTable.body,
		};

        SetStyle( MenuButtonStyle ),
        Button
        {
			name = "menuyes",
			x=17,
			y=258,
			w=133,
			h=25,
			graphics = MediumButton1Graphics,
			MenuButtonLabel(0, 0, 143, 32, "yes", oldsansblackFont, 24, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255)),
			close = true,
			command=
				function()
					if (gDialogTable.yes) then 
						gDialogTable.yes() ; 
					end
				end;
        },
		
        Button
        {
			name = "menuno",
			x=247,
			y=258,
			w=133,
			h=25,
			graphics = MediumButton1Graphics,
			MenuButtonLabel(0, 0, 143, 32, "no", oldsansblackFont, 24, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255)),
			close = true,
			command=
				function() 
					if (gDialogTable.no) then
						gDialogTable.no() ; 
					end
                end;
        },
        
    },

} -- MakeDialog
