WoWInterface (
-   MoP Beta archived threads (
-   -   Vertical statusbars finally working as intended (

zork 08-31-12 11:43 AM

Vertical statusbars finally working as intended
Out of curiosity I did a test.

And see what I got.

Vertical statusbars finally working as intended!!!

Thus it is finally possible to use non-rectangular textureobjects on vertical statusbars. So no more workaround with SetTexCoord handling...sweet!

Going to do some more tests with different texture sizes.



Yep...still working. Now that is pretty awesome.

I tested this because my burning ember display should be a vertical statusbar containing a flame texture.

Seerah 08-31-12 12:00 PM

If it didn't work before, then what were HUDs using?

zork 08-31-12 12:06 PM

Well...I'm using
Lua Code:
  1. local updatePlayerHealth = function(bar, unit, min, max)
  2.     local d = floor(min/max*100)
  3.     bar.Filling:SetHeight((min / max) * bar:GetWidth())
  4.     bar.Filling:SetTexCoord(0,1,  math.abs(min / max - 1),1)
  5.     ...
  6. end
until now.

Because when I created oUF_D3Orbs (err...long time ago) the vertical statusbar textures bugged out all the time.

Seerah 08-31-12 12:29 PM

Oh, derp - texcoords. Need moar caffeine!

Gragagrogog 09-17-12 10:31 AM

I've noticed there's a new(new to me at least) status bar method SetReverseFill(1nil), which would supposedly fill the texture from the other side, but here is what it does(2nd and 4th row):

(i used your code just with bar:SetReverseFill(1))

So you still have to use SetTexCoord for R2L and T2B orientations, unless u want that wierd sliding behaviour.

zork 09-17-12 04:22 PM

Hmm intesting though. Same SetTexCoord just opposite SetPoint.

It can be used if you need a ping-pong like animation. (Dropping ball or the like)

All times are GMT -6. The time now is 11:33 AM.

vBulletin © 2018, Jelsoft Enterprises Ltd
© 2004 - 2017 MMOUI