WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   WoD Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=151)
-   -   Action Bar changes? (https://www.wowinterface.com/forums/showthread.php?t=49592)

Coote 08-07-14 08:14 AM

Action Bar changes?
 
I'm unable to get ncHoverBind to bind any buttons on the action bars, yet bars such as the pet bar still bind perfectly. I looked through all the changes posted, and can't see anything that looks to have changed the bars in such a way to break hover binds.

zork 08-07-14 08:58 AM

Diff.
https://code.google.com/p/rothui/source/detail?r=1262

Hmm...

Coote 08-07-14 11:28 AM

Thanks, Zork. There doesn't seem to be any obvious change sticking out that would have done it. I'll just have to stick this in the backburner a bit until things settle down and I get the time to really sit down and try fixing anything.

Phanx 08-07-14 09:05 PM

Quote:

Originally Posted by zork (Post 294955)

Off topic, but Google Code is really looking quite outdated and ugly compared to GitHub et. al. :(

phiobos 08-26-14 07:19 AM

Maybe it is related to the official cooldown timer recently added

Duugu 08-26-14 11:31 AM

The action buttons inherit from ActionBarButtonCodeTemplate and ActionButtonTemplate.

The old and the new ActionButtonTemplate sets OnClick to the function SecureActionButton_OnClick.

The old ActionBarButtonCodeTemplate doesn't had an Onclick script.
The new ActionBarButtonCodeTemplate sets OnClick to this script

Lua Code:
  1. <OnClick>
  2.     if (not self.draenorZoneDisabled) then
  3.         SecureActionButton_OnClick(self, button);
  4.     end
  5. </OnClick>
I've read somewhere that the 'inherits' attribute just copies the tags from the template. So, with using two templates something that is specified in both must be overwritten. As Blizzard specifies all templates from the most common to the most specific from the right to the left I guess again that the tags are copied from the right to the left.
Keeping that in mind I would say it overwrites the Onclick from ActionButtonTemplate (as the 'inherits' attribute is "ActionBarButtonCodeTemplate, ActionButtonTemplate").

That means your code

Lua Code:
  1. local button = SecureActionButton_OnClick
  2.  
  3.         local function register(val)
  4.             if val.IsProtected and val.GetObjectType and val.GetScript and val:GetObjectType()=="CheckButton" and val:IsProtected() then
  5.                 local script = val:GetScript("OnClick")
  6.                 if script==button then
  7.                     val:HookScript("OnEnter", function(self) bind:Update(self) end)
  8.                 elseif script==stance then
  9.                     val:HookScript("OnEnter", function(self) bind:Update(self, "STANCE") end)
  10.                 elseif script==pet then
  11.                     val:HookScript("OnEnter", function(self) bind:Update(self, "PET") end)
  12.                 end
  13.             end
  14.         end
won't trigger as the action buttons OnClick is not longer equal to SecureActionButton_OnClick.

Maybe you could fix this with

Lua Code:
  1. local button = ActionButton1:GetScript("OnClick")

I'm not sure if this is correct. :) It's just a guess.

btw: What is draenorZoneDisabled good for?
[e] Ah, it's for handling garrison action Buttons.

Coote 08-26-14 02:47 PM

I forgot all about this. It's been a very difficult month with way too much going on. >.<


Thanks Duugu, your guess was spot on, that single line actually did get it up and working perfectly.


All times are GMT -6. The time now is 09:57 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI