mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
fix mousueover for many ui addons and add many more to support them
This commit is contained in:
@@ -4,25 +4,24 @@
|
||||
]]
|
||||
local _G = _G or getfenv(0)
|
||||
local CleveRoids = _G.CleveRoids or {}
|
||||
CleveRoids.mouseoverUnit = CleveRoids.mouseoverUnit or nil
|
||||
|
||||
local Extension = CleveRoids.RegisterExtension("DiscordUnitFrames")
|
||||
Extension.RegisterEvent("ADDON_LOADED", "OnLoad")
|
||||
|
||||
function Extension.OnEnterFrame()
|
||||
CleveRoids.mouseoverUnit = this.unit
|
||||
CleveRoids.SetMouseoverFrom("duf", this.unit)
|
||||
end
|
||||
|
||||
function Extension.OnLeaveFrame()
|
||||
CleveRoids.mouseoverUnit = nil
|
||||
CleveRoids.ClearMouseoverFrom("duf")
|
||||
end
|
||||
|
||||
function Extension.OnEnterElement()
|
||||
CleveRoids.mouseoverUnit = this:GetParent().unit
|
||||
CleveRoids.SetMouseoverFrom("duf", this:GetParent().unit)
|
||||
end
|
||||
|
||||
function Extension.OnLeaveElement()
|
||||
CleveRoids.mouseoverUnit = nil
|
||||
CleveRoids.ClearMouseoverFrom("duf")
|
||||
end
|
||||
|
||||
function Extension.OnLoad()
|
||||
@@ -38,4 +37,4 @@ function Extension.OnLoad()
|
||||
Extension.Hook("DUF_Element_OnLeave", "OnLeaveElement")
|
||||
end
|
||||
|
||||
_G["CleveRoids"] = CleveRoids
|
||||
_G["CleveRoids"] = CleveRoids
|
||||
|
||||
Reference in New Issue
Block a user