Originally Posted by Unkn
............
OOC and InCombat Panels
Code:
{ name = "Tester1", --in combat show
anchor_to = "CENTER", y_off = 0, x_off = 0,
width = 100, height = 100, strata = "background",
bg_color = {0,0,0}, bg_alpha = 1,
OnLoad=function(self)
self:RegisterEvent'PLAYER_REGEN_ENABLED'
self:RegisterEvent'PLAYER_REGEN_DISABLED'
self:Hide()
end,
OnEvent=function(self) ToggleFrame(self) end
},
{ name = "Tester2", --NOT in combat show
anchor_to = "CENTER", y_off = 200, x_off = 200,
width = 100, height = 100, strata = "background",
bg_color = {0,0,0}, bg_alpha = 1,
OnLoad=function(self)
self:RegisterEvent'PLAYER_REGEN_ENABLED'
self:RegisterEvent'PLAYER_REGEN_DISABLED'
self:Show()
end,
OnEvent=function(self) ToggleFrame(self) end
},
This was me testing to move some elements when I was in combat or out. The panels "move". Can do the same thing for different color depending on combat state. Just place the panels - same width and height - in exact same place and make them different colors.
|
Quoting myself... oh yeah...
I would suggest doing something similar with your panels. Just a toggle for in/out combat. Let me know how if it works I may be able to tweak it for you.