diff --git a/Dominos/bars/actionBar/button.lua b/Dominos/bars/actionBar/button.lua index afa3e152..b70fe202 100644 --- a/Dominos/bars/actionBar/button.lua +++ b/Dominos/bars/actionBar/button.lua @@ -499,6 +499,7 @@ end -- standard method references ActionButton.UpdateCooldown = ActionButton_UpdateCooldown ActionButton.UpdateFlyout = ActionBarActionButtonMixin.UpdateFlyout +ActionButton.GetHotkey = Addon.BindableButton.GetHotkey -- exports Addon.ActionButton = ActionButton diff --git a/Dominos/core/bindableButton.lua b/Dominos/core/bindableButton.lua index c16fe04e..f7988a28 100644 --- a/Dominos/core/bindableButton.lua +++ b/Dominos/core/bindableButton.lua @@ -115,26 +115,15 @@ function BindableButton:AddQuickBindingSupport(button, bindingAction) else button.UpdateHotkeys = BindableButton.UpdateHotkeys end - - if not button.GetHotkey then - button.GetHotkey = BindableButton.GetHotkey - end end function BindableButton:UpdateHotkeys() - self.HotKey:SetText(self:GetHotkey() or '') - self.HotKey:SetShown(Addon:ShowBindingText()) + local hotkey = self.HotKey + hotkey:SetText(getButtonHotkey(self)) + hotkey:SetShown(Addon:ShowBindingText()) end -function BindableButton:GetHotkey() - local key = (getButtonBindings(self)) - - if key then - return KeyBound:ToShortKey(key) or '' - end - - return '' -end +BindableButton.GetHotkey = getButtonHotkey function BindableButton:OnEnter() if not KeyBound:IsShown() then