DragonFlight CLICK bindings broken?

i have this in my bindings.xml file

<Binding name="CLICK ARKINV_MountToggle:LeftButton" category="BINDING_HEADER_ARKINV" />

the ARKINV_MountToggle button is created via

btn = CreateFrame( "Button", "ARKINV_MountToggle", UIParent, "SecureActionButtonTemplate" )
btn:SetAttribute( "type", "macro" )
btn:SetPoint( "CENTER" )
btn:Hide( )
btn:SetAttribute( "macrotext", macrotext )

macrotext = [[/run print("mount up")\n]]
its normally onload calculated but for testing purposes i’ve just been using a simple print

it stopped working in dragonflight and i cant figure out why. theres no feedback when you press the keybind, and no errors anywhere that i can find, it just doesnt seem to run. normal keybindings are working fine.

ive already reported it ingame but has anyone else seen this or know whats changed in dragonflight, or possibly where to look?

Did you btn:RegisterForClicks("AnyUp, AnyDown")?

no, its never needed it, but it worked, so thankyou.

A new quirk in need of fixing.

after some testing in live using both up and down causes a double up on the action so i tried just AnyUp which was ok in retail, but it failed in beta (would not run).

eventually settled on using LeftButtonDown as the CLICK binding is left button based and it works in both retail and beta (at least so far)

i would have preferred LeftButtonUp but it looks like beta hates all of the up choices at the moment and is ignoring them

1 Like

The ActionButtonUseKeyDown cvar seems to determine whether the up or down is recognized.

If a user has theirs disabled (“0”), then a LeftButtonDown will be ignored; just as you saw LeftButtonUp ignored on the beta because your ActionButtonUseKeyDown is enabled (“1”).

2 Likes

that makes sense but i presume the default SecureActionButtonTemplate must be missing some code as it only works on up, never down, regardless of cvar, whereas the default action bar icons will quite happily shift between both values.

it looks like i’ll need to learn how a full blown action button has to be setup to get this to work correctly.

i presume most people must have that cvar set to up or my keybinding would never work for them and they’ve only noticed in the beta where its set to down.

well it seems i cant use a real action button as they link to the actual ones and sort of links them together which i dont want to do.

the CVAR_UPDATE event does not trigger when you set a cvar - it looks like something for the interface options. so listening for changes and updating it via that wont work.

right now i cant tell if beta is buggy or fixed. if i register both up and down it only runs once, and based off the cvar value - ie it looks like its working rather well

retail on the other hand, best i can do at the moment is to check the cvar and shift the registerforclicks each time its run. i presume most people wont muck around with that very often, if at all, so it should be ok. if i leave both registered it runs on both the up and down (the cvar check code is not in that template, its in another one that uses it but that causes weird stuff with the 1st action bar button)

this is what i ended up with for the moment

local btn = ARKINV_MountToggle
if not btn then
	btn = CreateFrame( "Button", "ARKINV_MountToggle", UIParent, "SecureActionButtonTemplate" )
	btn:SetAttribute( "type", "macro" )
	btn:SetPoint( "CENTER" )
	btn:Hide( )
	btn:RegisterForClicks( "LeftButtonDown", "LeftButtonUp" )
end
btn:SetAttribute( "macrotext", macrotext )

if ArkInventory.ClientCheck( nil, ArkInventory.Const.BLIZZARD.GLOBAL.EXPANSION.SHADOWLANDS ) then
	local state = ArkInventory.CrossClient.GetCVarBool( "ActionButtonUseKeyDown" )
	if state then
		btn:RegisterForClicks( "LeftButtonDown" )
	else
		btn:RegisterForClicks( "LeftButtonUp" )
	end
end
1 Like

edit: Yeah there appears to be a bug here with CLICK bindings.

This patch has no many bugs it’s crazy. There’s no way this is ready for a pre-patch in a few weeks.

1 Like

Pre-patch, < 1 week. We can only hope the 10.0.2 launch release on 28 Nov. will have most of this fixed but it is also providing new APIs so…

1 Like

I’m anxious to return to three official WoW clients instead of five.

3 Likes

Did this work? The action buttons for me always responds to LeftButtonUp in retail ptr and ignores the cvar ActionButtonUseKeyDown value.

it did up until about 3 days ago.

its now “broken” in such a way that i think only blizzard can fix it - presuming they believe its a bug and not the new normal.

1 Like

button = CreateFrame(“Button”,“LAs1”,nil,“SecureActionButtonTemplate”)
button:SetAttribute(“type”,“macro”)
button:SetAttribute(“macrotext”,’/castrandom Spectral Tiger, Black War Tiger’)

While this worked yesterday, and last expansion come to it, /click LAs1 does nadda now. Suggestions?

Try /click LAs1 LeftButton

If space is limited in the macro you can do /click LAs1 X and it should work too.

A couple beta/ptr builds ago, the mouse button argument (LeftButton) was needed on 10.0.2 (beta) but not 10.0.0 (ptr). In the next build it was not needed on either. In last week’s build it was needed on 10.0.0 but not 10.0.2.

So be aware this may change.

2 Likes

Ah! It seems you MUST pass the Down value. mutter At least, that’s my guess

Many, many thanks!

I suppose it didn’t matter until there were spells needing to know this. Still, the default could have been left at zero.

Thanks for this!

Before:

local buttonName = "BinderMount1_"..value.spell

button = CreateFrame("Button", buttonName, UIParent, "SecureActionButtonTemplate")

button:SetAttribute("type", "spell")
button:SetAttribute("spell", value.spell)
button:SetAttribute("unit", "player")

local status = SetBindingClick(value.key, buttonName)

After:

    local buttonName = "SsiardBinderMount1_"..value.spell

    button = CreateFrame("Button", buttonName, UIParent, "SecureActionButtonTemplate")

    button:SetAttribute("type", "spell")
    button:SetAttribute("spell", value.spell)
    button:SetAttribute("unit", "player")
    button:RegisterForClicks("LeftButtonDown", "LeftButtonUp")

    local status = SetBindingClick(value.key, buttonName, "LeftButton 1")

Oooooh thank you. I know next to no LUA but I’ve been “updating” a defunct addon for myself for like 10 years and 10.0 finally killed it. After digging through the code and this post I think I’ll be able to fix it now since it uses /Click.

If anyone happens to want to fix and re-up this addon for others…
https://www.curseforge.com/wow/addons/whistle

I’ll consider it if this fix works when I can get home to test it.

I was trying to fix an older addon that is no longer maintained by the original author.
/console ActionButtonUseKeyDown 0 Worked for me on the live pre-patch… I say this after having struggled for hours to find an alternative for button:WrapScript(button, 'OnClick', castedAbility)

I have a feeling we’re gonna get slapped with a new "working as intended." lol

local f = CreateFrame("Button", "ClickTest", UIParent, "SecureActionButtonTemplate")

f:RegisterForClicks("AnyDown","AnyUp")
f:SetAttribute("type","spell")
f:SetAttribute("spell","Rain of Fire")

print("ActionButtonUseKeyDown:",GetCVar("ActionButtonUseKeyDown"))

On 10.0.0 (live and PTR):

When ActionButtonUseKeyDown is 0:

  • /click ClickTest works
  • /click ClickTest LeftButton doesn’t work

When ActionButtonUseKeyDown is 1:

  • /click ClickTest LeftButton works
  • /click ClickTest doesn’t work

On 10.0.2 (beta);

Regardless of ActionButtonUseKeyDown:

  • /click ClickTest works
  • /click ClickTest LeftButton doesn’t work

It’s a mess.

4 Likes