Thread Tools Display Modes
03-28-10, 09:48 PM   #1
Flarin
A Frostmaul Preserver
 
Flarin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 290
Graphical Health/Mana Possible?

I am wondering if this framework will support the type of unitframes that are in the RealUI http://www.wowinterface.com/download...ealUIBeta.html compilation done with Pitbull? I really like the little arrows that slide over a range from min to max.

Is something like this possible with oUF?


Thanks!
__________________

"I will crush and destroy and...ooo...shiny..."

  Reply With Quote
03-29-10, 03:47 AM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Everything that is possible with other unitframe addons is possible with oUF, and then some.
  Reply With Quote
03-29-10, 05:41 AM   #3
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
Repositioning the arrows is possible, yup. But you will need OverrideUpdateHealth or PostUpdateHealth.
Code:
local function PostUpdateHealth(event, unit, bar, min, max)
    if event ~= 'UNIT_HEALTH' or event ~= 'UNIT_MAXHEALTH' then return end -- if not a health event, do nothing
    if not bar.arrow then return end -- if element does not have an arrow texture, do nothing
    local offset = (min/max) * bar:GetWidth()
    bar.arrow:SetPoint( 
        bar.rtl and 'RIGHT' or 'LEFT', 
        bar.rtl and -offset or offset,
        0
    )
end
Then in your layout code you can just create the arrow (self.Health.arrow) and use self.Health.rtl to define if the arrow goes from right to left if wanted.
This is drycoded, so it (might|will probably|won't) work.

Last edited by ravagernl : 03-29-10 at 05:48 AM.
  Reply With Quote
03-29-10, 05:44 AM   #4
Flarin
A Frostmaul Preserver
 
Flarin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 290
Awesome - thanks for the replies!
__________________

"I will crush and destroy and...ooo...shiny..."

  Reply With Quote
03-29-10, 05:53 AM   #5
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
The orbs of rothui are done with oUF aswell. You can do whatever you want. I like oUF because it makes me feel like Bob Ross.
__________________
| 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
03-29-10, 06:40 AM   #6
Petrah
A Pyroguard Emberseer
 
Petrah's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2008
Posts: 2,988
Originally Posted by zork View Post
I like oUF because it makes me feel like Bob Ross.
Let's build us a happy, little cloud that floats around the sky.
__________________
♪~ ( ) I My Sonos!
AddOn Authors: If your addon spams the chat box with "Addon v8.3.4.5.3 now loaded!", please add an option to disable it!
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Graphical Health/Mana Possible?


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