mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-04 20:50:01 +00:00
addonbuttons: detect minimap backdrop as parent
This commit is contained in:
@@ -212,11 +212,13 @@ pfUI:RegisterModule("addonbuttons", "vanilla:tbc", function ()
|
||||
SetupMainFrame()
|
||||
end
|
||||
|
||||
local parent
|
||||
local function GetTopFrame(frame)
|
||||
if frame:GetParent() == Minimap or frame:GetParent() == UIParent or not frame:GetParent() then
|
||||
parent = frame:GetParent()
|
||||
if not parent or parent == Minimap or parent == MinimapBackdrop or parent == UIParent then
|
||||
return frame
|
||||
else
|
||||
return GetTopFrame(frame:GetParent())
|
||||
return GetTopFrame(parent)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user