fix taint (Gladdy show in combat)

This commit is contained in:
Sumsebrum 2021-07-26 17:01:04 +02:00
parent c2fec39202
commit f92b3a4964
3 changed files with 14 additions and 23 deletions

View File

@ -104,7 +104,7 @@ function Gladdy:CreateFrame()
self.anchor:Hide()
end
self.frame:Hide()
self.frame:SetAlpha(0)
end
function Gladdy:UpdateFrame()
@ -271,7 +271,7 @@ end
function Gladdy:HideFrame()
if (self.frame) then
self.frame:Hide()
self.frame:SetAlpha(0)
self.frame.testing = nil
end
end
@ -297,7 +297,7 @@ function Gladdy:ToggleFrame(i)
self.curBracket = i
self:UpdateFrame()
self:Test()
self.frame:Show()
self.frame:SetAlpha(1)
end
end

View File

@ -251,10 +251,13 @@ function Gladdy:OnEnable()
self:RegisterEvent("UPDATE_BATTLEFIELD_STATUS")
self:RegisterEvent("PLAYER_ENTERING_WORLD")
self:CreateFrame()
for i = 1, 5 do
self:CreateButton(i)
end
self.curBracket = 5
self:UpdateFrame()
self:Reset()
if (IsAddOnLoaded("Clique")) then
ClickCastFrames = ClickCastFrames or {}
@ -425,8 +428,8 @@ function Gladdy:JoinedArena()
self.curBracket = 2
end
self:SendMessage("JOINED_ARENA")
self.frame:Show()
Gladdy:SendMessage("JOINED_ARENA")
self.frame:SetAlpha(1)
for i=1, self.curBracket do
self.buttons["arena" .. i]:SetAlpha(1)
end

View File

@ -53,8 +53,8 @@ BINDING_NAME_GLADDYBUTTON3_BUTTON5 = L["Button5 Click Enemy 3"]
BINDING_NAME_GLADDYBUTTON4_BUTTON5 = L["Button5 Click Enemy 4"]
BINDING_NAME_GLADDYBUTTON5_BUTTON5 = L["Button5 Click Enemy 5"]
function Clicks:Initialise()
self:RegisterMessage("JOINED_ARENA")
function Clicks:Initialize()
--
end
function Clicks:Reset()
@ -62,21 +62,14 @@ function Clicks:Reset()
end
function Clicks:ResetUnit(unit)
local button = Gladdy.buttons[unit]
if (not button) then
return
--
end
for k, v in pairs(Gladdy.db.attributes) do
button.secure:SetAttribute(v.modifier .. "macrotext" .. v.button, "")
end
function Clicks:UpdateFrame(unit)
self:SetupAttributes(unit)
end
function Clicks:Test()
Clicks:JOINED_ARENA()
end
function Clicks:JOINED_ARENA()
function Clicks:UpdateFrameOnce()
for k, v in pairs(Gladdy.buttons) do
local left = GetBindingKey(("GLADDYBUTTON%d_LEFT"):format(v.id))
local right = GetBindingKey(("GLADDYBUTTON%d_RIGHT"):format(v.id))
@ -222,8 +215,3 @@ function Clicks:GetOptions()
end
return options
end
function Clicks:UpdateFrame(unit)
self:SetupAttributes(unit)
self:JOINED_ARENA()
end