Key Bind Handlers - WoWInterface
Thread Tools Display Modes
Prev Previous Post   Next Post Next
09-12-13, 03:25 PM   #1
An Onyxian Warder
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 397
Key Bind Handlers

Wrapping a secure button's OnClick handler is easy enough but there always needs to be extra code to handle the key binds associated with that button. In some cases the overhead involved for processing key binds may actually be greater than the code it is there to support, especially for the primary action bar which its key binds can be redirected to two other action bars.

My suggestion would to be change the key bind handling functions to emulate being clicked rather than directly calling the function normally assigned to their OnClick handlers. So, for example, in ActionButtonDown and ActionButtonUp the line:
SecureActionButton_OnClick(button, "LeftButton")
would instead be:
Such a simple change would always allow a button with a wrapped/hooked OnClick handler to behave the same whether directly clicked or triggered via a key bind with no extra overhead.
  Reply With Quote

WoWInterface » Developer Discussions » Wish List » Key Bind Handlers

Thread Tools
Display Modes

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