mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-17 18:20:49 +00:00
adding SetMouseoverUnit for Unitframes.
adding SetMouseoverUnit for Unitframes.
This commit is contained in:
@@ -1702,6 +1702,18 @@ end
|
|||||||
|
|
||||||
function pfUI.uf.OnEnter()
|
function pfUI.uf.OnEnter()
|
||||||
if not this.label then return end
|
if not this.label then return end
|
||||||
|
|
||||||
|
-- Nampower/SuperWoW: Set native mouseover unit for macro/addon compatibility
|
||||||
|
if SetMouseoverUnit then
|
||||||
|
local unitstr = this.label .. this.id
|
||||||
|
-- For GUID-based frames (focus), use the GUID directly
|
||||||
|
if this.label and string.find(this.label, "^0x") then
|
||||||
|
SetMouseoverUnit(this.label)
|
||||||
|
elseif UnitExists(unitstr) then
|
||||||
|
SetMouseoverUnit(unitstr)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if this.config.showtooltip == "0" then return end
|
if this.config.showtooltip == "0" then return end
|
||||||
GameTooltip_SetDefaultAnchor(GameTooltip, this)
|
GameTooltip_SetDefaultAnchor(GameTooltip, this)
|
||||||
GameTooltip:SetUnit(this.label .. this.id)
|
GameTooltip:SetUnit(this.label .. this.id)
|
||||||
@@ -1709,6 +1721,11 @@ function pfUI.uf.OnEnter()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function pfUI.uf.OnLeave()
|
function pfUI.uf.OnLeave()
|
||||||
|
-- Nampower/SuperWoW: Clear native mouseover unit
|
||||||
|
if SetMouseoverUnit then
|
||||||
|
SetMouseoverUnit()
|
||||||
|
end
|
||||||
|
|
||||||
GameTooltip:FadeOut()
|
GameTooltip:FadeOut()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user