Animate textures
Anyone got any knowledge on how to animate textures, say like a healthbar texture, in oUF?
|
Quote:
|
Well i was sort of fascinated how SyncUI does animation on the unitframes. And i was wondering if someone have any experience doing this in oUF.
|
Quote:
|
I see. Thanks.
Hm looks quite complicated:P |
Quote:
You can check his code in \SyncUI\Modules\Elements\StatusBar\StatusBar.lua file, table of coordinates is the biggest part of it :D Syncrow's code is pretty easy to read, so you shouldn't have any problems. And that's his "slide" map \SyncUI\Media\Textures\Elements\Statusbar\StatusBar_Animated_Fluid.tga. |
Yes i have looked at it. But what i do not understand is how he uses this to represent his bars in the unitframes. Like where in the code:o
|
Quote:
He has a .Fill texture, that is used for animation, this particular texture is attached to statusbar texture. It's all written in the code there, please, read more carefully :3 Lua Code:
Code:
<StatusBar name="SyncUI_AnimatedStatusBarTemplate" virtual="true"> Code:
<StatusBar parentKey="HealthBar" name="$parentHealthBar" inherits="SyncUI_AnimatedStatusBarTemplate" useParentLevel="true" minValue="0" maxValue="100"> |
Here's an example of a simplified lua implementation w/o xml-templates. A simple statusbar constructor, based on existing functions from StatusBar.lua.
Ofc you'll have to add some other code, cuz I dun intend to write everything for ya :D Lua Code:
Then you spawn statusbars like so: Lua Code:
|
Thanks again lightspark:)
|
All times are GMT -6. The time now is 01:33 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI