require "scripts/dialog_common.lua"

play_from_database( "requester_open", false, 1.0, 0, 0 )



MakeDialog
{
    name = "really_exit",

    Bitmap {
        image = "images/background.png",
        x = 0,
        y = 0,
        w = 800,
        h = 600,
        alpha = true,

    ReallyExitWindow {
        fit = true,
        x = kCenter,
        y = kCenter,
        w = 497,
        h = dialog_height( 200 ),

        requester_background( 200, "blue", "better" ),

        Text
        {
            font = SmallerSpecialRequesterTitleFont,
            name = "window_title",
            x = kCenter, y = 32 + 0, w = 160, h = 34,
            flags = kHAlignCenter + kVAlignCenter,
            label = "exit_window_title"
        },



        Text
        {
            font = SpecialRequesterTitleFont,
            name = "window_text",
            x = kCenter, y = kCenter, w = kMax, h = 45,
            flags = kHAlignCenter + kVAlignCenter,
            label = "exit_window_really"
        },
		
		Button {
            name = "button_yes",
            x = kCenter - 80,
            y = kMax - 30,
            align = kHAlignCenter + kVAlignBottom,
            type = kPush,
            graphics = NewButtonGraphics,
            scale = 1,
            default = true,
            command=function()
                play_from_database( "button_click", false, 1.0, 0, 0 )
                ExitGame()
                PopModal( "really_exit" )
            end,
            Text {
                label = "profile_dialog_yes",
                x = 0, y = 2, w = kMax, h = 27,
                flags = kHAlignCenter + kVAlignCenter,
                font = RequesterButtonFont,
            },
        },
		
		Button {
            name = "button_no",
            x = kCenter + 80,
            y = kMax - 30,
            align = kHAlignCenter + kVAlignBottom,
            type = kPush,
            graphics = NewButtonGraphics,
            scale = 1,
            default = true,
            command=function()
                play_from_database( "button_click", false, 1.0, 0, 0 )
                PopModal( "really_exit" )
            end,
            Text {
                label = "profile_dialog_no",
                x = 0, y = 2, w = kMax, h = 27,
                flags = kHAlignCenter + kVAlignCenter,
                font = RequesterButtonFont,
            },
        },
    },
    },
    FitToChildren(),
}
