Originally Posted by Fizzlemizz
You need to have the two events PET_BATTLE_CLOSE and PET_BATTLE_OPENING_START registered for a frame (one you want to hide). And assuming they're not secure frames then in its OnEvent function:
Code:
if event == "PET_BATTLE_CLOSE" then
if self.PetBattleHidden then
self.PetBattleHidden = nil
self:Show();
OtherPanel:Show()
-- Show other panels
return
end
end
if not self:IsVisible() then return; end
if event == "PET_BATTLE_OPENING_START" then
self.PetBattleHidden = true
self:Hide()
OtherPanel:Hide()
-- Hide other panels
end
|
I'm not getting it. I'm not familiar with LUA scripting. I got the following panelframe which i want to hide in pet battles:
Code:
lpanels:CreateLayout("Button Bar", {
-- Buttonbar background
{ name = "Buttonbar",
width = "783", height = 86,
y_off = 7, x_off = "552",
bg_color = "0.1 0.1 0.1", bg_alpha = 1,
level = 4,
},
-- Lines around the box
{ name = "BB_left", parent = "Buttonbar",
anchor_to = "LEFT",
width = 1, height = 86, x_off = -1,
bg_color = "0.3 0.3 0.3", bg_alpha = 1,
level = 5,
},
{ name = "BB_right", parent = "Buttonbar",
anchor_to = "RIGHT",
width = 1, height = 86,
bg_color = "0.3 0.3 0.3", bg_alpha = 1,
level = 5,
},
{ name = "BB_top", parent = "Buttonbar",
anchor_to = "TOP",
width = 783, height = 1,
bg_color = "0.3 0.3 0.3", bg_alpha = 1,
level = 5,
},
{ name = "BB_bottom", parent = "Buttonbar",
anchor_to = "BOTTOM",
width = 783, height = 1,
bg_color = "0.3 0.3 0.3", bg_alpha = 1,
level = 5,
},
})
Where do i have to put that script you're showing?