Removed OnUpdate hook and made keybindings show properly
This commit is contained in:
+2
-11
@@ -154,16 +154,6 @@ end
|
|||||||
|
|
||||||
local oor, oorcolor, oomcolor
|
local oor, oorcolor, oomcolor
|
||||||
|
|
||||||
local orig_ActionButton_OnUpdate = ActionButton_OnUpdate
|
|
||||||
ActionButton_OnUpdate = function(self, elapsed)
|
|
||||||
local name = self:GetName()
|
|
||||||
if self.BT4init then
|
|
||||||
onUpdate(self, elapsed)
|
|
||||||
else
|
|
||||||
orig_ActionButton_OnUpdate(self, elapsed)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function onUpdate(self, elapsed)
|
function onUpdate(self, elapsed)
|
||||||
if self.flashing == 1 then
|
if self.flashing == 1 then
|
||||||
self.flashtime = self.flashtime - elapsed
|
self.flashtime = self.flashtime - elapsed
|
||||||
@@ -257,6 +247,7 @@ end
|
|||||||
|
|
||||||
function Button:Update()
|
function Button:Update()
|
||||||
self:UpdateAction(true)
|
self:UpdateAction(true)
|
||||||
|
self:UpdateHotkeys()
|
||||||
self:ToggleButtonElements()
|
self:ToggleButtonElements()
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -291,7 +282,7 @@ function Button:UpdateHotkeys()
|
|||||||
local key = self:GetHotkey() or ""
|
local key = self:GetHotkey() or ""
|
||||||
local hotkey = self.hotkey
|
local hotkey = self.hotkey
|
||||||
|
|
||||||
if key == "" or self.parent.config.hidehotkey or not HasAction(self.action) then
|
if key == "" or self.parent.config.hidehotkey then
|
||||||
hotkey:SetText(RANGE_INDICATOR)
|
hotkey:SetText(RANGE_INDICATOR)
|
||||||
hotkey:SetPoint("TOPLEFT", self, "TOPLEFT", 1, -2)
|
hotkey:SetPoint("TOPLEFT", self, "TOPLEFT", 1, -2)
|
||||||
hotkey:Hide()
|
hotkey:Hide()
|
||||||
|
|||||||
Reference in New Issue
Block a user