From 56793c2613fb42d88de985c9885e77d20df8c1e7 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Fri, 25 Jan 2008 16:53:37 +0000 Subject: [PATCH] * Highlight fix, typo fix --- PerfectRaid.lua | 2 +- PerfectRaid_Highlight.lua | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/PerfectRaid.lua b/PerfectRaid.lua index 303ffca..9b337a1 100644 --- a/PerfectRaid.lua +++ b/PerfectRaid.lua @@ -117,7 +117,7 @@ function PerfectRaid:Enable() self:RegisterEvent("CHAT_MSG_SYSTEM") -- Create our raid frames - self:UpdateeRaidFrames() + self:UpdateRaidFrames() end function PerfectRaid:UpdateRaidFrames() diff --git a/PerfectRaid_Highlight.lua b/PerfectRaid_Highlight.lua index a470ef7..fad6e63 100644 --- a/PerfectRaid_Highlight.lua +++ b/PerfectRaid_Highlight.lua @@ -58,6 +58,7 @@ local backdrop = { }, } +local mouseover local function OnEnter(frame) local opt = PerfectRaid.db.profile.highlight if( opt.tooltip and frame.unit ) then @@ -66,12 +67,14 @@ local function OnEnter(frame) if( opt.mouseover ) then frame:SetBackdropColor(0.9, 0.9, 0.9, 0.3) + mouseover = frame end end local function OnLeave(frame) GameTooltip:Hide() Highlight:UpdateUnit(nil, frame) + mouseover = nil end function Highlight:UpdateButtonLayout(button, options) @@ -147,10 +150,18 @@ function Highlight:UpdateUnit(unit, frame) end if frame then - frame:SetBackdropColor(r,g,b,a) + if frame == mouseover then + frame:SetBackdropColor(0.9, 0.9, 0.9, 0.3) + else + frame:SetBackdropColor(r,g,b,a) + end else for frame in pairs(frames[unit]) do - frame:SetBackdropColor(r,g,b,a) + if frame == mouseover then + frame:SetBackdropColor(0.9, 0.9, 0.9, 0.3) + else + frame:SetBackdropColor(r,g,b,a) + end end end end -- 1.7.9.5