As title states, it is my intention to have a drop-down menu that displays only when you right-click on a bar...
Everything seems set up just fine, the menu is perfect in display, functionality, just first time the bar is displayed per session the drop down menu is displayed as well.
Here are the bits of code that I can see as having an involvement in the issue, the rest is just variables for the display of the menu options (Taken from WLGF):
Code:
local function WLGF_RightClick_HideAll()
for i = 1, 4, 1 do
if (WLGF["RC_BG_group"..i] ~= nil) then
WLGF["RC_BG_group"..i]:SetHidden(true)
end
end
end --WLGF_RightClick_HideAll()
if (WLGF["RC_BG_"..owner]:IsHidden()) then
WLGF["RC_BG_"..owner]:SetAnchor(BOTTOMLEFT, GuiRoot, TOPLEFT, mouseLeft,mouseTop)
WLGF["RC_BG_"..owner]:SetHidden(false)
local function WLGF_RightClick_Click(button, owner)
if (button == 2) then
WLGF_RightClick_Toogle(owner)
else
WLGF["RC_BG_"..owner]:SetHidden(true)
end
end --WLGF_RightClick_Click()
WLGF["RC_BG_"..owner] = Chain(WINDOW_MANAGER:CreateControl("WLGF_RC_BG_"..owner, WLGF["Anchor_group"..num], CT_BACKDROP))
:SetDimensions(200,100)
:SetCenterTexture(center_tex)
:SetEdgeTexture(edge_tex, 128, 16)
:SetInsets(16,16,-16,-16)
:SetDrawLayer(1)
:SetHidden(false)
.__END
Can anybody see in that code as to why the menu displays automatically upon group creation, only once, always the first group creation per play session
Note: WLGF is
WarLegendsGroupFrames, I am planning on updating it and releasing it once I hear back from Lyeos.