Quantcast

* Highlight fix, typo fix

James Whitehead II [01-25-08 - 16:53]
* Highlight fix, typo fix
Filename
PerfectRaid.lua
PerfectRaid_Highlight.lua
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