mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-26 05:50:50 +00:00
nameplates: keep target nameplate above others
Thanks @Otari98 for the idea and implementation via: https://github.com/shagu/ShaguPlates/pull/30
This commit is contained in:
@@ -787,6 +787,20 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
|
|||||||
nameplate.eventcache = nil
|
nameplate.eventcache = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- reset strata cache on target change
|
||||||
|
if nameplate.istarget ~= target then
|
||||||
|
nameplate.target_strata = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- keep target nameplate above others
|
||||||
|
if target and nameplate.target_strata ~= 1 then
|
||||||
|
nameplate:SetFrameStrata("LOW")
|
||||||
|
nameplate.target_strata = 1
|
||||||
|
elseif not target and nameplate.target_strata ~= 0 then
|
||||||
|
nameplate:SetFrameStrata("BACKGROUND")
|
||||||
|
nameplate.target_strata = 0
|
||||||
|
end
|
||||||
|
|
||||||
-- cache target value
|
-- cache target value
|
||||||
nameplate.istarget = target
|
nameplate.istarget = target
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user