Thread Tools Display Modes
03-16-11, 05:54 AM   #1
Pyrates
A Cliff Giant
 
Pyrates's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 77
PostUpdateAltPower?

I'd need some advice about the AltPowerBar I'm sorta thinking of for my bossframes. I want to make it the way RealUI does it for health: Just a line with an arrow below it, and the arrow moves along the line indicating the right number (I'll want to have the exakt number attached to the arrow, too).

So, I'm thinking to do it along those lines: Make a very small AltPowerBar, just single color background, and then single color "foreground" (is that a word?). Then I'd make a function PostUpdateAltPower so I can move the arrow. I'd try to use a tag for the text of the bar, but parent it to the arrow so it moves along with it.

Is that the right idea? I tried browsing github to find out about PostUpdateAltPower, but couldn't really find it, does it exist? I'd be grateful for any pointers to see if I'm on the right track

Side question: How could one test this bar? I realize I could use something like 'self.unit="player"' to test the frames themselves, but that wouldn't make the AltPowerBar of the unitframe show up, would it?

(e) Another side question: Is there a possibility to spawn the boss frames, but still have the blizzard ones? So I could test mine without loosing vital info during a raid.
__________________
" ... and the Vogon will do things to you that you wish you'd never been born, or, if you're a clearer minded thinker, that the Vogon had never been born."

Last edited by Pyrates : 03-16-11 at 07:11 AM. Reason: Spelling
  Reply With Quote
03-16-11, 12:55 PM   #2
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Sounds correct. The post-update is define like most of them in oUF[1]

An easy way to test is with the plants vs ghouls quest in hillsbrad and in the maw of madness.

To have the default frames stay: modify oUFisableBlizzard() in blizzard.lua to not remove the boss frames (by commenting it out or whatever).

[1] https://github.com/haste/oUF/blob/ma...werbar.lua#L24
__________________
「貴方は1人じゃないよ」
  Reply With Quote
03-16-11, 04:02 PM   #3
Pyrates
A Cliff Giant
 
Pyrates's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 77
Thanks a lot

Now, do you have any suggestion how to test boss frames? I tried using

Code:
/script x = MyBossFrame1 x.hide = function() Show() end; x:Show() x.unit = "player"
But that kinda didn't work out, the AltPower didn't show up and change and things, although I'm pretty sure I made things correct (due to the fact that I c&p'ed things out of a working layoug, and the frame looks good, no errors...). Of course I could still have made an error, but how does everybody else test those things?
__________________
" ... and the Vogon will do things to you that you wish you'd never been born, or, if you're a clearer minded thinker, that the Vogon had never been born."
  Reply With Quote
03-16-11, 04:09 PM   #4
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Just spawn a player frame with the boss frame style. Should be pretty easy to do, unless you are using the old if-mangled-single-style solution :P

There aren't really any easy to test boss units you can abuse. At least not that I know of.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
03-17-11, 04:05 AM   #5
Pyrates
A Cliff Giant
 
Pyrates's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 77
Hmm, that sounds a lot like I'd need to know what I'm talking about I'm learning by doing, copying together various codes and getting rid of errors... that's why I need test cases so badly

I don't know what's the old vs new solution. I have a function shared, I register a style with it, and then I call

Code:
boss[i] = oUF:Spawn("boss"..i, "MyBoss"..i)
The shared function doesn't test for the unit (it's only there to make boss frames), so I tried

Code:
oUF:Spawn("player", "SanUItest")
but that did nothing. What would I need to do here? I do have an ouf player frame already, do I need to disable that?

Again, thanks for any help If there are any resources I should be aware of, other than the wiki on github, I'd be glad if someone could point them out
__________________
" ... and the Vogon will do things to you that you wish you'd never been born, or, if you're a clearer minded thinker, that the Vogon had never been born."
  Reply With Quote
03-17-11, 09:34 AM   #6
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
You can spawn 30 player frames if you feel like it. oUF doesn't prevent it. It does sound like you have a single-style, and if it doesn't do any unit checking, then spawning a player frame should work just fine. As long as you anchor it with :SetPoint().

You'll have to paste your code if you want any further help. I can't really give you any more hints :P.
__________________
「貴方は1人じゃないよ」
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » PostUpdateAltPower?


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