WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Dynamic Slanted Unitframe Bar Textures? (https://www.wowinterface.com/forums/showthread.php?t=39617)

tenub 04-13-11 11:34 AM

Dynamic Slanted Unitframe Bar Textures?
 
Any idea how to do this?


Seerah 04-13-11 12:04 PM

I have no clue what you mean by "dynamic", but that's entirely possible using a custom statusbar texture.

tenub 04-13-11 12:22 PM

Meaning the slant is dynamic rather than static, ie. it moves when the health value updates.

Bad & easy to achieve:


Good & what I'm asking about:

Aprikot 04-13-11 04:23 PM

I can't offer a solution, but I remember looking at screenshots from zork's ringmod, and wondering how he made the spark truly radial. Maybe applicable, maybe not. :p

tenub 04-13-11 04:47 PM

Yeah I remember that and I'd think something as simple as this would be very easy to achieve. We just need to know how.

Foxlit 04-13-11 04:55 PM

Mess with TexCoord transformations. In particular, moving the upper left corner further left and the lower right corner out further right might provide the desired effect.

Nillerr 04-14-11 01:20 AM

I would use two frames of the shaped texture, then cut the edges it instead of reducing the width using SetTexCoord.

jaliborc 04-14-11 06:53 AM

Make 3 tga files:
  • The white edge (a white irregular triangle)
  • The red edge (a red irregular triangle)
  • The white to red edge (where the white meets the red; two triangles of different colors)

Code 5 textures (from left to right):
  • The white edge
  • A white rectangle
  • The white to red edge
  • A red rectangle
  • The red edge

You simply need to change the rectangles sizes according to the health you want to display.

On a side note, the "red to white edge" can be done programmatically by using the "white edge" and the "red edge" again (and rotating them).


All times are GMT -6. The time now is 04:22 AM.

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