require( "scripts/style.lua" );

local pnl_gates_rollover_name = "pnl_gates_rollover";

function Spawn_GatesRollOverPanel(badge_x, badge_y)
    return Group
    {
        BitmapVisual
        {
            name = "badge_gates",
            x=badge_x,y=badge_y,
            image = "buttons/buttonup",
            disabled = true,
            rect      = "-13,33;16,33;58,20;58,-20;14,-33;-17,-33;-62,-18;-62,24;",
            
            SetStyle(TextStyle),
            CreateMinionText(22, ButtonYellow, kCenter+1, kCenter+1, "#"..GetString("button_outline", GetString("click_here")), 140, 22),
            CreateMinionText(22, ButtonBrown, kCenter, kCenter, "#"..GetString("button_outline", GetString("click_here")), 140, 22),
        },
        
        WindowExt
        {
            name = pnl_gates_rollover_name,
            w=254,h=168,
            x=512, y=250,
            
            state_handlers = {
                justcreated = function()
                    EnableWindow(pnl_gates_rollover_name, false);
                end;
                showed = function()
                    EnableWindow(pnl_gates_rollover_name, true);
                end,
                hidden = function()
                    EnableWindow(pnl_gates_rollover_name, false);
                end,
            },
            
            BitmapVisual
            {
                x=127,y=84,
                name = "picture",
                image="interface/game/pop_up_object/rollover_obj",
                
                -- title
                SetStyle(TextStyle),
                CreateMinionText(20, CaptionYellow, kCenter, 20, "gates_rollover_title", 100, 20),
                CreateMinionNamedText(18, WhiteColor, kCenter, kCenter, "gates_rollover_body", 180, 60, "body"),
            },
        },
    };
end;