mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-29 18:56:02 +00:00
api: restore custom parents on movables
This commit is contained in:
@@ -563,6 +563,12 @@ function pfUI.api.LoadMovable(frame, init)
|
||||
end
|
||||
|
||||
if pfUI_config["position"][frame:GetName()] then
|
||||
if pfUI_config["position"][frame:GetName()]["parent"] then
|
||||
frame:SetParent(_G[pfUI_config["position"][frame:GetName()]["parent"]])
|
||||
else
|
||||
frame:SetParent(UIParent)
|
||||
end
|
||||
|
||||
if pfUI_config["position"][frame:GetName()]["scale"] then
|
||||
frame:SetScale(pfUI_config["position"][frame:GetName()].scale)
|
||||
end
|
||||
@@ -591,6 +597,7 @@ function pfUI.api.SaveMovable(frame)
|
||||
C.position[frame:GetName()]["xpos"] = round(xpos)
|
||||
C.position[frame:GetName()]["ypos"] = round(ypos)
|
||||
C.position[frame:GetName()]["anchor"] = anchor
|
||||
C.position[frame:GetName()]["parent"] = frame:GetParent():GetName()
|
||||
end
|
||||
|
||||
-- [ Update Movable ]
|
||||
|
||||
Reference in New Issue
Block a user