Thread Tools Display Modes
01-15-12, 11:18 AM   #1
Monolit
A Black Drake
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 81
Originally Posted by haste View Post
As of 4.3, you only need to do StatusBar:SetReverseFill(true) to reverse the direction of the statusbar.
That's a little bit different thing,
StatusBar:SetReverseFill(true) will just essentially mirror your status bar, and what I meant with "Reverse status bars" is that it also changes the way it behaves, i.e. at 100% HP status bar would stay at 0% mark, at 70% HP it would be 30% filled etc. (picture above actually represents it quite well).

The method posted above still works flawlessly @ live realms and should be quite easy to implement in any layout.

Actually I think it can be done a little bit differently using SetReverseFill, but it would require pretty much the same texture manipulations in PostUpdate or Override callbacks. MAYBE it would be a little bit more efficient performance-wise though.

Last edited by Monolit : 01-15-12 at 11:40 AM.
  Reply With Quote
01-17-12, 04:20 PM   #2
Othgar
"That" Guy
 
Othgar's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 228
I finally got my textures switched around so everything looked better but SetReverseFill(true) still didn't really work out for me. I tried to enable it on my player frame to get the bars to fill from left to right, and instead of filling the bars it actually shifted the textures and skewed them as the bar depleted. I tried a bunch of stuff to try to get them right but nothing seemed to work. I'll probably try again either later tonight or tomorrow and I'll see if I can fraps a vid of it.

oUF_Lust is the outcome of it for now.
__________________



Last edited by Othgar : 01-17-12 at 04:21 PM. Reason: added link
  Reply With Quote
01-21-12, 04:46 AM   #3
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by Monolit View Post
That's a little bit different thing,
StatusBar:SetReverseFill(true) will just essentially mirror your status bar, and what I meant with "Reverse status bars" is that it also changes the way it behaves, i.e. at 100% HP status bar would stay at 0% mark, at 70% HP it would be 30% filled etc. (picture above actually represents it quite well).

The method posted above still works flawlessly @ live realms and should be quite easy to implement in any layout.

Actually I think it can be done a little bit differently using SetReverseFill, but it would require pretty much the same texture manipulations in PostUpdate or Override callbacks. MAYBE it would be a little bit more efficient performance-wise though.
You could simplify it down to:
Lua Code:
  1. Health:SetReverseFill(true)
  2. Health.PostUpdate = function(Health, unit, min, max)
  3.    Health:SetValue(max - Health:GetValue())
  4. end
__________________
「貴方は1人じゃないよ」
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » reverse status bars (again)


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