Giter Club home page Giter Club logo

Comments (10)

StormFX avatar StormFX commented on August 19, 2024

ChargeCooldowns are recycled, thus they're created and [re]assigned dynamically. That particular line of code exists only to catch any CCDs that are assigned to buttons when they're skinned. So the existing code is correct.

As far as the placement of the "Action" check, I've no problem with moving it down. I was unaware that any add-ons were using them outside the context of Action buttons.

from masque.

ZinohJoe avatar ZinohJoe commented on August 19, 2024

Ahh okay. TellMeWhen uses a seperate frame for chargeCooldowns. I wasn't able to get it skinned without changing that line though.

from masque.

StormFX avatar StormFX commented on August 19, 2024

You're referring to the "Action" check? That's the only thing that's changed.

from masque.

ZinohJoe avatar ZinohJoe commented on August 19, 2024

The change from Button -> Regions

from masque.

StormFX avatar StormFX commented on August 19, 2024

The current implementation is how it's always been, so if you had to change it to get it to work, that means it's never worked.

from masque.

ZinohJoe avatar ZinohJoe commented on August 19, 2024

You're right. I didn't realize it wasn't intended for Masque to skin deliberately created static charge cooldown frames the same as it does for regular cooldown frames. Assumed it was an oversight.

I have a custom circular skin I made that I use in TMW. I wanted Masque to skin TMW's charge frame so it would follow the circularedge and utilize custom edge textures if desired. It only took the change I initially mentioned here (along with moving the Action check line) and adding the following line to TMW to allow Masque to skin its charge frame.

https://github.com/Zinoh/TellMeWhen/commit/eed6e2fc27a55120c283305a5242969b8a975a08#diff-d5ef1ed81d47d0ddfff60601cf13eeb1

Edit: I only use Masque to skin WeakAuras and TellMeWhen so I wasn't aware of how the charge cooldown skinning is implemented in regular action buttons. I see that now.

from masque.

ZinohJoe avatar ZinohJoe commented on August 19, 2024

I realize now that an addon like TMW should utilize the UpdateCharge API already in Masque to skin its charge frame. I'll see how to implement that in TMW and submit a ticket there. Apologies if I caused any confusion :).

from masque.

StormFX avatar StormFX commented on August 19, 2024

A ChargeCooldown is just a Cooldown with its SetDrawSwipe set to false, so there's really no reason to distinguish between the two, aside from that. Even if an author uses both the edge and swipe, Masque should catch it.

If TMW uses a static ChargeCooldown, then I've no problems adding a check for that in the Regions table as that demonstrates a use case. Note that the key will be ChargeCooldown. It seems TMW actually skips that particular region anyhow, and only passes Icon, HotKey , Count and Cooldown. So you'd have to submit a request to TMW to have that region added.

I've yet to notify the author of the changes to :AddButton(), so that will need to be updated as well. As far as I'm aware, TMW doesn't provide actual clickable buttons but they have some regions that an Action button has so the logical course would be to pass "Action" as the type and then set Strict to true.

Edit: In regards to your follow-up post, if the ChargeCooldown is static (never changes its parent), there's no reason to call :UpdateCharge() unless TMW changes something that Masque has done.

from masque.

ZinohJoe avatar ZinohJoe commented on August 19, 2024

That makes sense. I believe TMW utilizes a seperate frame for charges so that GCD swipes can be shown independently without interrupting the re-charge animation (which utilizes an edge w/ no swipe). As far as I can tell the charge frame does remain static upon icon creation. It does seem then in that case adding a check in the Regions table would be necessary.

Right, until now TMW didn't pass the charge frame as a skinnable frame to Masque. I was hoping to submit a ticket to change that and demonstrate it working. That sent me down the rabbit hole of making the changes that I ended up making, heh. Thanks for the advice.

from masque.

StormFX avatar StormFX commented on August 19, 2024

No problem. I'm currently trying to go through my skins, but I'll make the appropriate changes that should be in the next alpha.

from masque.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.