require "scripts/style"

local retry = "Replay";
local checkin_title = "Check_In";
local yes="yes" ;
local yesname="yes" ;
local no="no" ;
local noname="no" ;
local name="yesnobox";
local yescmd=gDialogTable.yes;
local nocmd=gDialogTable.no;
local darkBgk = ""
local bgk="backgrounds/ir_bg_diabox01"

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

if (gDialogTable.darkBgk) then
	darkBgk = gDialogTable.darkBgk;
end
if (gDialogTable.bgk) then
	bgk = gDialogTable.bgk;
end

MakeDialog
{
	name=name, -- Remember, this is like saying table['name']=name, so it works.
	Bitmap{
		image=darkBgk,
		x=kCenter,
		y=kCenter,
		alpha=true,
		scale=1.2
	},
    Bitmap
    {
		image=bgk,
		x=kCenter,
		y=kCenter,

		SetStyle(DialogTitleText),
        Text
		{
			name = "yesnotitle",
			label= gDialogTable.title,
		};

		SetStyle(DialogBodyText),
		Text
		{
			name = "yesnobody",
			label= gDialogTable.body,
		};

        SetStyle(ButtonStyle),
        Button
        {
			graphics={"buttons/ir_btn_univ_sm01","buttons/ir_btn_univ_sm03","buttons/ir_btn_univ_sm02"},
			command=
				function()
					if (yescmd) then
						yescmd() ;
					end
				end;
            close = true,
            flags = 5,
            MenuButtonLabel3(retry,37,13),
            name = yesname,
            x = kCenter-100,
            y = kMax-90,
        },
        Button
        {
			graphics={"buttons/ir_btn_univ_sm01","buttons/ir_btn_univ_sm03","buttons/ir_btn_univ_sm02"},
			command=
				function()
					if (nocmd) then
						nocmd() ;
					end
                end;
            close = true,
            flags = 5,
            MenuButtonLabel3(checkin_title,33,13),
			sound = "audio/sfx/Menu_Click01.ogg",
            name = noname,
            x = kCenter+100,
            y = kMax-90,
        },

    },

} -- MakeDialog
