OmniCC

OmniCC

58M Downloads

[question] How do I add OmniCC integration to addons?

haasn opened this issue · 2 comments

commented

I want to add OmniCC support to an addon.

I understand that OmniCC modifies some sort of generic “cooldown sweep” frame, which apparently a lot of addons re-use in order to get OmniCC integration - but from a quick glance at the OmniCC setup code I could not figure out which exact frame it is or how I want to be using it.

A line or two in the documentation aimed at developers rather than users would be great.

commented

Sorry for the delay little saber.

The short story is that OmniCC hooks into the "Cooldown" frame type. One of the ones you can select when you call CreateFrame (getting technical, it hooksecurefunc the metatable of the frame class). Whenever .SetCooldown is called on a cooldown frame, OmniCC starts tracking it and displays a text countdown over it.

The reason that is not on the documentation is because I was never asked, so never though to add it. OmniCC should work straight out of the box when you make a cooldown, you don't have to add support specifically for it.

commented

Hope that solves your question. Also added a page to the wiki about this.