Most efficient button range check
I'm using the default Blizzard buttons and I want to make the icon go red instead of having the keybinding text go red.
As this basically has to be an OnUpdate I'm trying to think of ways of doing this the most efficiently.
Currently what I am doing is hooking the default ActionButton_OnUpdate function and thottling it by checking if the rangeTimer is equal to 0.2 (magic number). rangeTimer goes up to 2 before being reset by the default code.
Now what I'm thinking about is how this ranks up against creating a new OnUpdate for every button or creating a single OnUpdate for all buttons.
__________________
I stopped playing back World of Warcraft in 2010 and I have no plans on returning.
This is a dead account and if you want to continue any of my addons or make a fork then feel free to do so.
This is your permission slip.
If you need to contact me, do so on Twitter @v6ooo
Best regards, v6.
Last edited by v6o : 03-14-10 at 06:54 PM.
|