Thread Tools Display Modes
06-29-11, 10:47 AM   #1
Coldkil
A Cliff Giant
 
Coldkil's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 70
AltPowerBar not showing

Simple put, i haven't defined the AltPowerBar on my oUF layout.

It should be working and displaying the standard one. But it doesn't show. I'm sure that the problem is on my layout, since if i just disable that and it comes out correctly.

Any input?

I have the problem only with the new layout. The old one works wonderfully (also i moved it from standard position, so i don't know why)

EDIT: solved, i was defining the altpowerbar for boss frames, and it seems that you can set it up only for certain ones, but still it overrides every altpowerbar ingame.

If anyone know how to avoit this, i will be grateful.

Last edited by Coldkil : 06-29-11 at 12:28 PM. Reason: solved
  Reply With Quote
06-30-11, 02:03 AM   #2
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Boss frames are no header units and can be handled like player, pet or target unit.

If you create each frame via your style function you can create the bar and parent it to the self object via "self.AltPowerBar = bar" (where bar is your altPowerBar frame).

If you do that for pet, player, target and each bossframe (5 frames max) you will have 8 powerbars, all hidden. They will be activated accordingly once the power event returns some data for the given unit.

If you want to move stuff ingame or identify it via /fstack you should give the bar a global name like "myStyleAltPowerPlayer", "myStyleAltPowerPet" etc.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 06-30-11 at 02:06 AM.
  Reply With Quote
07-04-11, 03:42 AM   #3
Coldkil
A Cliff Giant
 
Coldkil's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 70
OK i'm going to try it.

my old code was
Code:
--alt powerbar for boss units
		if (unit and unit:find("boss%d")) then
			local AltPowerBar = CreateFrame("StatusBar", nil, self.Health)
			AltPowerBar:SetFrameLevel(self.Health:GetFrameLevel() + 1)
			AltPowerBar:SetHeight(4)
			AltPowerBar:SetStatusBarTexture(_TEXTURE)
			AltPowerBar:GetStatusBarTexture():SetHorizTile(false)
			AltPowerBar:SetStatusBarColor(.1, .1, .9, .7)

			AltPowerBar:SetPoint("LEFT")
			AltPowerBar:SetPoint("RIGHT")
			AltPowerBar:SetPoint("TOP", self.Health, "TOP")
			
			AltPowerBar:SetBackdrop(backdrop)
			AltPowerBar:SetBackdropColor(.6, .6, .6, .25)
			AltPowerBar:SetBackdropBorderColor(0,0,0)

			self.AltPowerBar = AltPowerBar
		end
So, if i defined it for bosses, i should define it for every frame i intend to have it otehrwise it won't be displayed right?
  Reply With Quote
07-05-11, 09:19 AM   #4
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Activating the oUF altPowerBar element will disable the default Blizzard altPowerBars. It is not intended to use the altPowerBar element and still maintain the default bar. (That may make sense if you only want the element for boss frames but that can't be done).

If you check the oUF/elements/altpowerbar.lua you will see that once you enable the altPowerBar element it will unregister the Blizzard AltPowerBars.

Just make an altPowerBar element for player, pet and you will be fine.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
07-06-11, 02:29 AM   #5
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
I added an issue for this when I initially saw it. I'll try to allocate some time to get it fixed.

Sent from my phone
__________________
「貴方は1人じゃないよ」
  Reply With Quote
07-07-11, 04:29 AM   #6
wizy
A Defias Bandit
Join Date: Nov 2009
Posts: 3
I was wondering if someone can help me with PowerBarAlt for Allez's UI (http://www.wowinterface.com/download...2-AllezUI.html). In his code PowerBarAlt appears as a red line on the top of the player's portrait. I would like to disable that function and make the default Blizzard bar appear.

I have commented out the following line in oUF.xml
Code:
<Script file='elements\altpowerbar.lua' />
but that made the red line visible at all times. I haven't checked if the default bar appears now since I haven't been to a raid since I made the change. I would like to make that red disappear.

I don't feel that confident to change this code since I have little knowledge of LUA, but maybe the following line being commented would do the trick?
Code:
_G["PlayerPowerBarAlt"]:HookScript("OnShow", function(self) self:ClearAllPoints() self:SetPoint("TOP", 0, -12) end)
Thanks in advance for any help.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » AltPowerBar not showing


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