Skip to content

Commit db28ec2

Browse files
committed
this instead
1 parent be97f41 commit db28ec2

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

ElvUI/Core/Modules/Skins/Skins.lua

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -781,12 +781,18 @@ do
781781
overlay:Show()
782782
end
783783

784-
local function OverlayOnEnter(overlay)
784+
local function OverlayOnEnter(button)
785+
local overlay = overlays[button]
786+
if not overlay then return end
787+
785788
overlay.text:SetTextColor(1, 1, 1)
786789
S:SetBackdropBorderColor(overlay, 'OnEnter')
787790
end
788791

789-
local function OverlayOnLeave(overlay)
792+
local function OverlayOnLeave(button)
793+
local overlay = overlays[button]
794+
if not overlay then return end
795+
790796
overlay.text:SetTextColor(1, 0.81, 0)
791797
S:SetBackdropBorderColor(overlay, 'OnLeave')
792798
end
@@ -810,9 +816,8 @@ do
810816
txt:SetTextColor(1, 0.81, 0)
811817
overlay.text = txt
812818

813-
overlay:SetScript('OnEnter', OverlayOnEnter)
814-
overlay:SetScript('OnLeave', OverlayOnLeave)
815-
819+
button:HookScript('OnEnter', OverlayOnEnter)
820+
button:HookScript('OnLeave', OverlayOnLeave)
816821
button:HookScript('OnHide', OverlayHide)
817822
button:HookScript('OnShow', OverlayShow)
818823

0 commit comments

Comments
 (0)