mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
42 lines
1.1 KiB
Lua
42 lines
1.1 KiB
Lua
--[[
|
|
Author: Dennis Werner Garske (DWG) / brian / Mewtiny
|
|
License: MIT License
|
|
]]
|
|
local _G = _G or getfenv(0)
|
|
local CleveRoids = _G.CleveRoids or {}
|
|
|
|
local Extension = CleveRoids.RegisterExtension("FocusFrame")
|
|
|
|
function Extension.RegisterMouseoverForFrame(frame)
|
|
local onenter = frame:GetScript("OnEnter")
|
|
local onleave = frame:GetScript("OnLeave")
|
|
|
|
frame:SetScript("OnEnter", function()
|
|
CleveRoids.SetMouseoverFrom("focus", "focus")
|
|
if onenter then
|
|
onenter()
|
|
end
|
|
end)
|
|
|
|
frame:SetScript("OnLeave", function()
|
|
CleveRoids.ClearMouseoverFrom("focus")
|
|
if onleave then
|
|
onleave()
|
|
end
|
|
end)
|
|
end
|
|
|
|
function Extension.OnLoad()
|
|
if not FocusFrameHealthBar
|
|
or not FocusFrameManaBar
|
|
or not FocusFrameTextureFrame
|
|
or not FocusFrame then
|
|
return
|
|
end
|
|
|
|
Extension.RegisterMouseoverForFrame(FocusFrameHealthBar)
|
|
Extension.RegisterMouseoverForFrame(FocusFrameManaBar)
|
|
Extension.RegisterMouseoverForFrame(FocusFrameTextureFrame)
|
|
Extension.RegisterMouseoverForFrame(FocusFrame)
|
|
end
|