mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
update ab
This commit is contained in:
@@ -116,9 +116,15 @@ function E:OnSetCooldown(start, duration, enable)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local oldCooldownFrame_SetTimer = CooldownFrame_SetTimer
|
||||||
function E:RegisterCooldown(cooldown)
|
function E:RegisterCooldown(cooldown)
|
||||||
if not E.private.cooldown.enable or cooldown.isHooked then return end
|
if not E.private.cooldown.enable or cooldown.isHooked then return end
|
||||||
hooksecurefunc("CooldownFrame_SetTimer", E.OnSetCooldown)
|
|
||||||
|
function CooldownFrame_SetTimer(this, start, duration, enable)
|
||||||
|
oldCooldownFrame_SetTimer(this, start, duration, enable)
|
||||||
|
E.OnSetCooldown(this, start, duration, enable)
|
||||||
|
end
|
||||||
|
|
||||||
cooldown.isHooked = true
|
cooldown.isHooked = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -160,6 +160,8 @@ function AB:PositionAndSizeBar(barName)
|
|||||||
else
|
else
|
||||||
button:SetAlpha(self.db[barName].alpha)
|
button:SetAlpha(self.db[barName].alpha)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self:StyleButton(button)
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.db[barName].enabled or not bar.initialized then
|
if self.db[barName].enabled or not bar.initialized then
|
||||||
@@ -278,12 +280,10 @@ function AB:StyleButton(button, noBackdrop)
|
|||||||
local hotkey = _G[name.."HotKey"]
|
local hotkey = _G[name.."HotKey"]
|
||||||
local border = _G[name.."Border"]
|
local border = _G[name.."Border"]
|
||||||
local macroName = _G[name.."Name"]
|
local macroName = _G[name.."Name"]
|
||||||
local normal = button:GetNormalTexture()
|
|
||||||
local buttonCooldown = _G[name.."Cooldown"]
|
local buttonCooldown = _G[name.."Cooldown"]
|
||||||
local color = self.db.fontColor
|
local color = self.db.fontColor
|
||||||
|
|
||||||
if flash then flash:SetTexture(nil) end
|
if flash then flash:SetTexture(nil) end
|
||||||
if normal then normal:SetTexture(nil) normal:Hide() normal:SetAlpha(0) end
|
|
||||||
if border then E:Kill(border) end
|
if border then E:Kill(border) end
|
||||||
|
|
||||||
if not button.noBackdrop then
|
if not button.noBackdrop then
|
||||||
@@ -310,6 +310,9 @@ function AB:StyleButton(button, noBackdrop)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if not button.noBackdrop and not button.backdrop then
|
if not button.noBackdrop and not button.backdrop then
|
||||||
|
button:SetNormalTexture("")
|
||||||
|
button.SetNormalTexture = E.noop
|
||||||
|
|
||||||
E:CreateBackdrop(button, "Default", true)
|
E:CreateBackdrop(button, "Default", true)
|
||||||
button.backdrop:SetAllPoints()
|
button.backdrop:SetAllPoints()
|
||||||
end
|
end
|
||||||
@@ -442,11 +445,7 @@ function AB:FixKeybindText(button)
|
|||||||
E:Point(hotkey, "TOPRIGHT", 0, -3)
|
E:Point(hotkey, "TOPRIGHT", 0, -3)
|
||||||
end
|
end
|
||||||
|
|
||||||
function AB:ActionButton_Update()
|
function _G.ActionButton_GetPagedID(button)
|
||||||
self:StyleButton(this)
|
|
||||||
end
|
|
||||||
|
|
||||||
function AB:ActionButton_GetPagedID(button)
|
|
||||||
if button.isBonus and CURRENT_ACTIONBAR_PAGE == 1 then
|
if button.isBonus and CURRENT_ACTIONBAR_PAGE == 1 then
|
||||||
local offset = GetBonusBarOffset()
|
local offset = GetBonusBarOffset()
|
||||||
if offset == 0 and ElvUI_Bar1 and ElvUI_Bar1.lastBonusBar then
|
if offset == 0 and ElvUI_Bar1 and ElvUI_Bar1.lastBonusBar then
|
||||||
@@ -507,8 +506,6 @@ function AB:Initialize()
|
|||||||
self:UpdateButtonSettings()
|
self:UpdateButtonSettings()
|
||||||
self:LoadKeyBinder()
|
self:LoadKeyBinder()
|
||||||
|
|
||||||
self:SecureHook("ActionButton_Update")
|
|
||||||
self:RawHook("ActionButton_GetPagedID")
|
|
||||||
self:SecureHook("PetActionBar_Update", "UpdatePet")
|
self:SecureHook("PetActionBar_Update", "UpdatePet")
|
||||||
self:RegisterEvent("UPDATE_BONUS_ACTIONBAR")
|
self:RegisterEvent("UPDATE_BONUS_ACTIONBAR")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user