Thread Tools Display Modes
Prev Previous Post   Next Post Next
03-14-10, 06:51 PM   #1
v6o
An Onyxian Warder
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 399
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.
  Reply With Quote
 

WoWInterface » Developer Discussions » General Authoring Discussion » Most efficient button range check


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off