View Single Post
01-16-12, 05:09 PM   #345
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 258
Originally Posted by Unkn View Post
............

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.
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"
  Reply With Quote