Ring unitframes
5 Attachment(s)
Quite a long time ago I posted a tutorial on how to do ring units in WoW.
http://elitistjerks.com/blogs/5362-zork/362-ring/ With a unit framework like oUF in mind it is no problem to create any kind of unitframe style template. (Any unit could use any template you created) Nobody really picked up on that so I want to give it another try. I made an example on what can be actually achieved by doing that. See the attached image. I also made a set of ring segment textures (same ring in different width) for further usage: http://code.google.com/p/rothui/sour...F_Ring%2Fmedia With creative usage of background and highlight textures pretty crazy things can be done. Think of texture animationgroups or texture blending. If you got any questions on that feel free to ask them. One caveat: It is not possible to start/end a segment on a value "> 0°" or "< 90°". The problem comes with the triangles that you stretch between (I) and (O). Example A - Still possible to do: http://dm.next-gen.org/files/ring/in...=13&SA=7&EA=49 Example B - Impossible: http://dm.next-gen.org/files/ring/in...13&SA=20&EA=49 As a result the only way to fix this is to start at 0° or 90° depending on filling direction. Direction A http://dm.next-gen.org/files/ring/in...=13&SA=0&EA=49 Direction B http://dm.next-gen.org/files/ring/in...13&SA=60&EA=90 Not sure if Blizzard has picked up on that but they added a pretty neat function to rotate clamped (already cropped via SetTexCoord) textures: http://wowprogramming.com/utils/xmlb...meXML/Util.lua This comes in pretty handy since we will need it to rotate the ring sements and slices. |
Lua Code:
|
Er, self.Width, self.Height is property in my class system, you can change it to SetHeight|GetHeight.
|
All times are GMT -6. The time now is 08:28 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI