Bug: HotKey Offsets are not Being Applied
Gethe opened this issue ยท 9 comments
When I updated from 7.2.0 to 7.2.3, the hotkey text no longer gets placed where defined in my skin. No matter what values I use for HotKey.OffsetX
or HotKey.OffsetY
, it always ends up in the wrong place.
I am using Bartender with this skin (this happens even after setting Masque_Version = 70200
)
I removed the code that overwrote HotKey.SetPoint
because it could cause taint and because Blizzard stopped using it. But apparently Nevcairiel's LibActionButton-1.0 is still using it. I may have to implement an interim fix until he updates it, assuming he even will. It's a bit annoying since it shouldn't be changing it on every single update.
On another note, is RealUI doing something wonky with the Cooldown and Cooldown Count? I've a user on WoW Interface saying that since I switched to a hook on the SetCooldown
method of the Cooldown frame, his Cooldown Count isn't showing up. Are you or your users experiencing something similar?
Yeah, RealUI has a custom cooldown count and the new hook is preventing that from showing.
Hm. I was under the impression that hooksecurefunc allowed for multiple hooks. Now I need to find something else to hook. :/
I think it's because I'm hooking the meta method while you're hooking the widget method, and the widget method takes precedence.
The only alternative is to use a countered recursive hook. I'll have to hook the SetSwipeColor to set the swipe color and then in the hook, exit out if I'm inside the hook already. Eg:
local function Hook_SetSwipeColor(Region, ...)
if Region.__InHook then return end
Region.__InHook = true
-- Get the custom r, g, b, a values
Region:SetSwipeColor(r, g, b, a)
Region.__InHook = nil
end
I'm assuming the SetSwipeColor
just calls a SetVertexColor
on the swipe texture object, but we can't access the object itself so that eliminates that option. We need a GetSwipeTexture
method. :/
As far as the HotKey goes, I suppose I can hook the Show
method of the region to counter LAB changing it.
I actually posted a ticket on LibActionButton-1.0 about this issue. It calls SetPoint()
depending on a few variables but is only actually visible in one of the positions. Thus, there's no valid reason for it be called in the UpdateHotkeys
function. Instead, it should be called in the CreateButton
method.