Thread Tools Display Modes
04/28/14, 12:25 PM   #1
Stoya
Join Date: Apr 2014
Posts: 3
[Request] Leftward Depleting Attribute Bars

I know the deplete-to-center style is an Elder Scrolls tradition, but I have always found it to be a bit less informative than deplete-to-left.

Is this even moddable in the API? I did a forum search and did not get any results. Hopefully this is simple, doable, and can be applied universally (on nameplate healthbars as well as default UI bars).

(I saw after I posted that this is in the wrong forum. Mods, please move it to addon requests)

Last edited by Stoya : 04/28/14 at 12:27 PM.
  Reply With Quote
04/28/14, 01:51 PM   #2
StealthStalker
Join Date: Mar 2014
Posts: 69
Many custom unit frames do this such as ZAM's, Factory Tactical Combat, ggFrames, Warlegend, and I'm sure there may be others by now. These are for the player and target frames though.

I do not know if any do it for the default bars.

I have yet to see anyone modify the floating hp bars above heads, but I don't think it's possible with the current API. I would love to be corrected on that though.
  Reply With Quote
04/28/14, 03:34 PM   #3
Zerorez
 
Zerorez's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 7
SetBarAlignment

There are multiple ways to achieve this. It all depends on how you change the size of the statusbar control.

If you use SetMinMax() and SetValue() to change the bar then the direction can be changed with the following:

Code:
control:SetBarAlignment( barAlignment )
barAlignment can be one of the following:
  • BAR_ALIGNMENT_CENTER
  • BAR_ALIGNMENT_NORMAL
  • BAR_ALIGNMENT_REVERSE

Alternatively if you set the width (or height if the bar is vertical) of the bar manually like this:
Code:
local valuePercent = newValue / valueMax   --divide new value from max to get percentage decimal
control:SetWidth( valuePercent * 200 )     -- set bar width to percent value multiplied by max bar width
It is simply a matter of how the bar is anchored. The bar will decrease toward the anchor point if done this way.


Personally, I use the second method and I believe FTC does as well. With this you can use any control type as a statusbar, giving way more options.


Hope that helps
  Reply With Quote
04/28/14, 03:38 PM   #4
StealthStalker
Join Date: Mar 2014
Posts: 69
This is purely for the Player and Target frames right, nothing we can do about the floating HP bars in the world?
  Reply With Quote
04/28/14, 04:37 PM   #5
Zerorez
 
Zerorez's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 7
yeah, currently there does not seem to be a way to modify nameplates
  Reply With Quote

ESOUI » AddOns » AddOn Search/Requests » [Request] Leftward Depleting Attribute Bars


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