Feature Request: Improve Chargecooldown Skinning
BrigitteLaTruite opened this issue ยท 10 comments
The yellow charge cooldown spirale remains squared even when picking a round skin.
Additionaly, trying to set this in the skin lua does not seem to change anything at all
ChargeCooldown = { Width = 0, Height = 0, Color = {0, 0, 0, 0}, },
This should be fixed in 4ad0eba.
I don't believe it's possible to change the shape of the cool down or charge cool down edge textures. This is why the former is placed under the border layer. But I'll look into it (again).
As far as the sizing goes, this could be interference from the add-on being skinned, but I'll look into it. I know it was working.
The charge cool down doesn't have a color setting.
To clarify my above comment, there are two textures:
- Swipe texture - the dark texture that covers the icon and lightens in a spiral as the cool down expires.
- Edge texture - the yellow line that trails the swipe texture, like a clock hand.
The swipe texture's shape can be changed. This is accomplished by using the alpha channel of a texture, not the "shape" setting. The edge texture's shape cannot be changed, AFAIK.
Update: I may have found a solution for the edge texture. I have to do some testing first. As far as the swipe texture goes, this is currently controlled by the skin. So if the skin doesn't supply a masked cool down texture for round buttons, the swipe texture will remain square. I'm considering including default swipe textures for supported shapes (currently only round and square).
SetUseCircularEdge(true) works. Here is a comparison on 2 TMW icons skinned by a personal Circular Masque skin. Used ViragDevTool to SetUseCircularEdge to true on the right icon. Unfortunately I believe it won't be compatible with TMW because TMW creates a separate frame for the charge cooldown frame which isn't skinned by Masque (TMW uses cooldown for normal CDs (skinned by Masque) and cooldown2 for subsequent charge CDs).
Edit: Just browsed through the commits and see that you've added your own handling of it since you posted your responses here. Disregard :)
I feel silly. I didn't even see that method when I was looking through the frame object. I'll have to test it out with my custom textures and see if I need to tweak them. But what I discovered is that it basically takes the edge texture, scales it up, applies a mask to it and then just rotates it. So what I did was shorten the "arm" for round buttons so that it never clips the boundaries of the mask.
Edit: As far as TMW, they can force Masque to update it via the API:UpdateCharge(Button} method.
Interesting. Are the cooldown animations (including the drawedge) all done under the hood? So no way to change the mask used by the Edge texture and such?
When I submitted my pull request to let Masque skin the glow of WeakAuras I tried to look into all that, but had no luck.
For the diamond glow I used your circular sprite sheet as a template.
The swipe can be customized by using a texture with an alpha channel, but the edge texture seems to be limited to a square or circle. What would be ideal is if they added a SetEdgeMaskTexture
method to cooldown frames. But as far as I'm away, all of the animations are done internally, hence why I had chop up the spell alert glow textures. Speaking of that, I'll probably redo the glow textures, as the current ones were just a quick hack to make it work.
That makes sense. Just curious, do you think it would be possible to make a Lib that implements a entirely lua-based cooldown/edge animation (allowing more modifications) like LibButtonGlow and LibCustomGlow does for glows?
Not that I have the knowledge do anything like that, Also, I know it probably wouldn't be worth the time invested. However it would be nice to be able to modify the color (mask texture too) of the edge texture without setting a new texture entirely.