Thread Tools Display Modes
02-28-10, 09:02 PM   #1
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
Plugin request - "oUF_Reverse"

I would highly appreciate if someone could write a plugin that enables oUF to reverse the fill direction of bars. As of now they always fill from left to right/deplete from right to left.

It would be great if one could simply add something like

Code:
self.health.reverse = true
or

Code:
self.power.reverse = true
in the layout to reverse the fill direction for a certain unit, maybe even separated for power and health.

I can try to write a function that can reverse the fill direction, based on RothUI's orb filling function. Even if I get that to work, I would still need some help getting this into a plugin and even more so to get the functionality described above.

Help, please!
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote
02-28-10, 09:16 PM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Reverse the minmax values and make the SetValue deplete
  Reply With Quote
03-01-10, 06:08 AM   #3
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
I know how to do that, in theory. But how do I put that into a plugin? I mean how to make it available for user specific units, like oUF_Smooth or your BarFader.

It's just that I think it's cleaner to put this into a plugin instead of putting it into the layout itself. Especially since a plugin can be used by a lot of people.


Edit:
I'm trying it like that...

health function
Code:
local updateHealth = function(self, event, unit, bar, min, max)
        bar:SetMinMaxValues(max, 0)
	bar:SetValue(max - min)
end
at the end of the layout

Code:
	self.OverrideUpdateHealth = updateHealth
	self.OverrideUpdatePower = updatePower
However, I'm only getting empty bars for now. Meh!
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."


Last edited by Dawn : 03-01-10 at 06:32 AM.
  Reply With Quote
03-01-10, 08:42 AM   #4
Guardix
A Cyclonian
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 42
I personally use reverse growing in my layout for the unitframes on the right side of the screen. You can take a look at it here, the update function does however need some cleaning ( ):
http://github.com/Guardix/oUF_Gdx
  Reply With Quote
03-01-10, 02:42 PM   #5
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
Thanks for the hint, I tried to implement that code into my layout, but it keeps being a pain. I can't get the statusbar's color to be the right one like I have it for non reversed bars.

It's also a "little" distracting that the background becomes the foreground and vice versa.
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Plugin request - "oUF_Reverse"


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