Reply
 
Thread Tools Display Modes
Unread 05-21-13, 02:35 AM   #1
skarie
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Jun 2011
Posts: 37
OUF_p3lim - Adding altpower

I am trying to add altpowerbar to target frame. So I went ahead and added below codes into target section. But it's not showing up. Any idea?

Code:
	
                local AltPower = CreateFrame('StatusBar', nil, self)
		AltPower:SetPoint('BOTTOM', 0, -10)
		AltPower:SetSize(230, 6)
		AltPower:SetStatusBarTexture(TEXTURE)
		AltPower:SetStatusBarColor(0.15, 0.7, 0.1)
		AltPower:SetBackdrop(BACKDROP)
		AltPower:SetBackdropColor(0, 0, 0)
		AltPower:EnableMouse(true)
		AltPower.colorTexture = true
		self.AltPowerBar = AltPower

		local AltPowerBG = AltPower:CreateTexture(nil, 'BORDER')
		AltPowerBG:SetAllPoints()
		AltPowerBG:SetTexture(1/3, 1/3, 1/3)
skarie is offline   Reply With Quote
Unread 05-21-13, 04:43 AM   #2
Rainrider
A Rage Talon Dragon Guard
Join Date: Nov 2008
Posts: 318
If you want it to show your player altpowerbar, you should parent it to the player frame. You could still position it wherever you want.
Rainrider is offline   Reply With Quote
Unread 05-21-13, 06:19 PM   #3
skarie
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Jun 2011
Posts: 37
Originally Posted by Rainrider View Post
If you want it to show your player altpowerbar, you should parent it to the player frame. You could still position it wherever you want.
I want to add altpowerbar to target frame (not player frame) because player frame already has a altpowerbar.

And since I added the codes inside the target frame section, self is indeed the target frame. I must have overlooked something obvious.
skarie is offline   Reply With Quote
Unread 05-21-13, 08:31 PM   #4
Rainrider
A Rage Talon Dragon Guard
Join Date: Nov 2008
Posts: 318
By what you posted I can tell what you've added (and it seems right), but not where you've added it. Also, how do you test this? Does UnitAlternatePowerInfo("target") return anything? What is its hideFromOthers return?
Rainrider is offline   Reply With Quote
Unread 05-21-13, 10:33 PM   #5
skarie
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Jun 2011
Posts: 37
Originally Posted by Rainrider View Post
By what you posted I can tell what you've added (and it seems right), but not where you've added it. Also, how do you test this? Does UnitAlternatePowerInfo("target") return anything? What is its hideFromOthers return?
I test it on LFR stone guards and check on boss energy bar .

I added the codes in local = UnitSpecific = { ... and inside target = function(self)..end .. }

I am gonna try to test out UnitAlternatePowerInfo("target") and hideFromOthers tonite.
skarie is offline   Reply With Quote
Unread 05-21-13, 11:36 PM   #6
nin
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 210
Not contributing much to the question but for testing maw of madness in twilight highlands is pretty good.
nin is offline   Reply With Quote
Reply

Go BackWoWInterface » Featured Projects » oUF (Otravi Unit Frames) » OUF_p3lim - Adding altpower

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off