fix mousueover for many ui addons and add many more to support them

This commit is contained in:
Jrc13245
2026-01-10 09:40:11 -05:00
parent e85217f148
commit d89853396b
16 changed files with 439 additions and 40 deletions
+40
View File
@@ -0,0 +1,40 @@
--[[
Author: SuperCleveRoidMacros
License: MIT License
X-Perl UnitFrames mouseover support.
Hooks into X-Perl's tooltip functions to track mouseover unit.
]]
local _G = _G or getfenv(0)
local CleveRoids = _G.CleveRoids or {}
local Extension = CleveRoids.RegisterExtension("XPerl")
Extension.RegisterEvent("ADDON_LOADED", "OnLoad")
-- X-Perl uses XPerl_PlayerTip(unitid) for OnEnter and XPerl_PlayerTipHide() for OnLeave
-- We hook these functions to track mouseover
function Extension.OnEnter(unitid)
if unitid and unitid ~= "" then
CleveRoids.SetMouseoverFrom("xperl", unitid)
end
end
function Extension.OnLeave()
CleveRoids.ClearMouseoverFrom("xperl")
end
function Extension.OnLoad()
-- Check if X-Perl is loaded by looking for its global functions
if not XPerl_PlayerTip then
return
end
-- Hook the tooltip show function
Extension.Hook("XPerl_PlayerTip", "OnEnter")
-- Hook the tooltip hide function
Extension.Hook("XPerl_PlayerTipHide", "OnLeave")
end
_G["CleveRoids"] = CleveRoids