07-25-16, 08:02 PM | #1 |
Creating UnitFrame with oUF
Hi all,
It's been a while since I posted my last thread here. I was damn busy for last couple of months finishing my work and finally back here to solve this old problem + new minor problem with the pre-patch of Legion. 1. As I replied on thread below this post (http://www.wowinterface.com/forums/s...4&postcount=22), I am still having an issue with creating reverse fill of status bar and flipping status bar texture. I've tried with both haste's and monolit's approaches, but failed on making it work. Lua Code:
Lua Code:
2. I was trying to create a combo points bar with using lightspark's version of oUF. For rogue, selecting 'Deeper Stratagem' as Tier 3 talent will increase its maximum combo point from 5 to 6 and I am not sure how I could apply this on oUF. I've attempted with MAX_COMBO_POINTS, but since this value is a constant, it does not seem to be working. Lua Code:
Could I get some help regarding those? Thank you! Last edited by Layback_ : 07-25-16 at 08:05 PM. |
|
07-25-16, 08:14 PM | #2 |
Do not use CPoints widget, use ClassIcons instead.
BTW, you can have up to 8 combo points at once. P.S. I proposed to remove CPoints from oUF, but I'll removed them from my version w/ next update. Last edited by lightspark : 07-25-16 at 08:24 PM. |
|
07-25-16, 08:31 PM | #3 |
As for reversed status bars, what are you trying to achieve w/ that weird updater thingy? O_o
statusbar:SetReverseFill(true) works fine, I use it myself and never had issues w/ it. Here is my target frame w/ reversed health bar. I added 1 line of code. Do something like this and you should be fine Lua Code:
Last edited by lightspark : 07-25-16 at 08:49 PM. |
|
07-25-16, 08:58 PM | #4 | |
I honestly don't know how that updater things works, but I brought it from monolit's old post About statusbar:SetReverseFill(true), yeah it works fine with pure solid textures, but behaves bit weird when the texture has some sort of shape on it. Please have a look at the .gif image that I captured The frame on the left is a player's frame while the one on the right is a target's frame. As you can see, the shape on player's frame stays on its position, but the shape on target's frame is moving as the value changes. Lua Code:
I want that shape stays still instead of it moving as the value changes. Also, if possible, I would like to flip the texture it horizontally as well for target frame! Thank you. |
||
07-25-16, 09:14 PM | #5 | |
-- update Texture like this, so you can colour it, size it and place it whichever way you want. Here's TGA. P.S. You can flip it horizontally via texture:SetTexCoord(1, 0, 0, 1). Last edited by lightspark : 07-25-16 at 09:47 PM. |
||
07-25-16, 09:46 PM | #6 | |
How about this? Few months ago, a guy called 'zork' explained me with his approach which I honestly failed to understand Thankfully, he shared his code and result as well. thread: http://www.wowinterface.com/forums/showthread.php?t=53203 oUF_Doom from zork's github: https://github.com/zorker/rothui/tree/master/wow6.0/oUF_Doom oUF_Doom result: http://imgur.com/a/BHfcs If you don't mind, could you please have a look and explain me how this works?! |
||
07-25-16, 10:01 PM | #7 | |
|
||
07-25-16, 10:46 PM | #8 | |
Am I getting it right...? mmmmmmmmmmmmmm...... This is so tricky Maybe, I should take more time to consider this. Thank you for your explanation!!!!!! ============================================================================= So!!!! About class icons, as you advised me, I have switched ComboPoints to ClassIcons Lua Code:
Unfortunately, since I am trying to use my own design(?) to display icons, I'm currently having some issue when I change spec or talent. For example, when 'Deeper Stratagem' was initially deactivated on AddOn load and activate it later via talent or spec change, this results in... Additionally, when 'Deeper Stratagem' was initially activated on AddOn load and deactivate it later via talent or spec change, this results in... As you can see, the size of each icon does not change on PLAYER_TALENT_UPDATE. I guess I'll have to manually edit it within ClassIcon element, but I ain't sure how I should start this ... Could you please advise me regarding this?! |
||
07-26-16, 01:29 AM | #9 | |
I use my own design w/ animations and other (unnecessary) things, and it works. There's no need for you to edit ClassIcons, cuz you fail to understand how ClassIcons widget works. It handles spec/talent/power switching well. I'll come back later and post reworked version of your code. -- update #1 The size wasn't changed on PLAYER_TALENT_UPDATE, because you didn't write code to resize it It doesn't happen on its own. All changes to class icons should be done in widget's PostUpdate. -- upadte #2 Lua Code:
That should do the trick. Last edited by lightspark : 07-26-16 at 02:00 AM. |
||
07-26-16, 03:06 AM | #10 | |
Just to make things clear, I had to add this line of code: Lua Code:
after Lua Code:
Otherwise, the texture itself gets massive. Thank you so much for your help!!! |
||
07-26-16, 03:09 AM | #11 |
You dun need to, there's an easier way to handle it.
Lua Code:
Create textures like so. |
|
07-26-16, 04:36 AM | #12 | |
I gotta study harder |
||
WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Creating UnitFrame with oUF |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|