View Single Post
Old 01-14-10, 02:36 PM   #1
st0nedpenguin
A Deviate Faerie Dragon
 
st0nedpenguin's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2005
Posts: 10
Mouseover text elements.

Howdy,

I'm wondering if it's possible to have a text element on my player/target frames that will display health status (current, missing, whatever) that when moused over will switch to showing mana status (current, max, whatever)?

Code:
	local health = self.Health:CreateFontString(nil, 'OVERLAY', 'sfontright')
	health:SetPoint('RIGHT', self.Health, -2, 0)
	health.frequentUpdates = 0.25
	self:Tag(health, '[shealth]')
Code:
	if(unit == 'player' or unit == 'target') then
		local power = self.Health:CreateFontString(nil, 'OVERLAY', 'sfontright')
		power:SetPoint('RIGHT', self.Health, -2, -8)
		power.frequentUpdates = 0.1
		self:Tag(power, '[spower][( )druidpower]')
	end
Is my current health/mana setup, modified version of P3lim's.
st0nedpenguin is offline   Reply With Quote