0
@@ -87,12 +87,10 @@ function ControlFreak:Enable()
0
lego:SetDB(self.db.char.frameopts)
0
- lego
.tooltiptext = L["Click to set focus\n"]..L["Type /freak or right-click to open config"]0
+ lego
:SetTooltip(L["Click to set focus\n"]..L["Type /freak or right-click to open config"])0
lego:SetText("Control Freak")
0
lego:SetAttribute("type", "macro")
0
lego:SetAttribute("macrotext", self.db.profile.macrotext)
0
- lego:SetScript("OnEnter", self.OnEnter)
0
- lego:SetScript("OnLeave", self.OnLeave)
0
self:ParseDebuffs(string.split(",", self.db.profile.spellname))
0
@@ -109,23 +107,6 @@ function ControlFreak:ParseDebuffs(...)
0
-function ControlFreak:OnEnter()
0
- if not ControlFreak.db.char.showtooltip then return end
0
- local sx, sy, x, y = GetScreenHeight(), GetScreenWidth(), self:GetCenter()
0
- local x1, y1, y2 = "RIGHT", "TOP", "BOTTOM"
0
- if x < (sx/2) then x1 = "LEFT" end
0
- if y < (sy/2) then y1, y2 = y2, y1 end
0
- GameTooltip:SetOwner(self, "ANCHOR_NONE")
0
- GameTooltip:SetPoint(y1..x1, self, y2..x1)
0
- GameTooltip:SetText(self.tooltiptext)
0
-function ControlFreak:OnLeave()
0
function ControlFreak:StartTimer()
0
@@ -248,10 +229,10 @@ function ControlFreak:OnUpdate(elapsed)
0
local casttarget = InCombatLockdown() and (not focusexists or focusdead) and targetexists
0
local clearfocus1 = focusexists and focusdead and not (InCombatLockdown() and targetexists and not targetdead)
0
local clearfocus2 = focusexists and not focusdead
0
- lego
.tooltiptext = (setfocus and L["Click to set focus\n"] or "")..
0
+ lego
:SetTooltip((setfocus and L["Click to set focus\n"] or "")..
0
(castfocus and L["Click to cast on focus\n"] or "").. (casttarget and L["Click to cast on target\n"] or "")..
0
(clearfocus1 and L["Click to clear focus\n"] or "").. (clearfocus2 and L["Shift-click to clear focus\n"] or "")..
0
- L["Type /freak or right-click to open config"]
0
+ L["Type /freak or right-click to open config"]
)0
lego:SetBackdropBorderColor(unpack(colors[color]))
Comments
No one has commented yet.