WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   MoP Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=162)
-   -   Vertical statusbars finally working as intended (https://www.wowinterface.com/forums/showthread.php?t=44073)

zork 08-31-12 11:43 AM

Vertical statusbars finally working as intended
 
Out of curiosity I did a test.
http://code.google.com/p/rothui/sour...StatusbarDebug

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.

:)

*edit*

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 10:38 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI