This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
I wasn't sure if you knew this or not, but Blizzard stopped adjusting the position of the HotKey text in the ActionButton_UpdateHotkeys function. Here's the snippet from the relevant function in ActionButton.lua:
if ( text == "" ) then hotkey:SetText(RANGE_INDICATOR); hotkey:Hide(); else hotkey:SetText(text); hotkey:Show(); end
In LibActionButton, however, that method is still being called:
if not key or key == "" or self.config.hideElements.hotkey then self.HotKey:SetText(RANGE_INDICATOR) self.HotKey:SetPoint("TOPLEFT", self, "TOPLEFT", 1, - 2) self.HotKey:Hide() else self.HotKey:SetText(key) self.HotKey:SetPoint("TOPLEFT", self, "TOPLEFT", - 2, - 2) self.HotKey:Show() end
The problem is that this overwrites Masque's placement of the HotKey region. In the previous version of Masque, I overwrote the SetPoint method of the region but this is bad practice and could potential cause taint so I removed it since Blizzard wasn't using it. I'm not sure if this is something you'd want to address in LAB or if I need to secure-hook the HotKey to make sure Masque can counter it. Figured I'd ask first before I put something in that I'll have to remove later (though I may have to do that anyhow :p).
Actually, looking at the code the SetPoint doesn't even need to be called in the UpdateHotkeys function as it's only visible in one position and that position can be set in the CreateButton method. I think this is why Blizzard removed it.
Without SetPoint @L1312
function UpdateHotkeys(self) local key = self:GetHotkey() if not key or key == "" or self.config.hideElements.hotkey then self.HotKey:SetText(RANGE_INDICATOR) self.HotKey:Hide() else self.HotKey:SetText(key) self.HotKey:Show() end end
Or check for Masque first:
function UpdateHotkeys(self) local key = self:GetHotkey() if not key or key == "" or self.config.hideElements.hotkey then self.HotKey:SetText(RANGE_INDICATOR) if not self.MasqueSkinned then self.HotKey:SetPoint("TOPLEFT", self, "TOPLEFT", 1, - 2) end self.HotKey:Hide() else self.HotKey:SetText(key) if not self.MasqueSkinned then self.HotKey:SetPoint("TOPLEFT", self, "TOPLEFT", - 2, - 2) end self.HotKey:Show() end end
To post a comment, please login or register a new account.