Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuller committed Jan 20, 2024
1 parent 4d0ddb9 commit 2c37ed0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
1 change: 1 addition & 0 deletions Dominos/bars/actionBar/button.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 4 additions & 15 deletions Dominos/core/bindableButton.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2c37ed0

Please sign in to comment.