From e10cfd3a26d631bbcae5d7b5c80009c23de6f08f Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 14 Jun 2020 22:52:06 +0200 Subject: [PATCH] api: add flag to save scale on position save --- api/api.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/api.lua b/api/api.lua index 26bfdc30..2305c21b 100644 --- a/api/api.lua +++ b/api/api.lua @@ -592,13 +592,16 @@ end -- [ Save Movable ] -- Save the positions of a Frame. -- 'frame' [frame] the frame that should be saved. -function pfUI.api.SaveMovable(frame) +function pfUI.api.SaveMovable(frame, scale) local anchor, _, _, xpos, ypos = frame:GetPoint() C.position[frame:GetName()] = C.position[frame:GetName()] or {} 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() and frame:GetParent():GetName() or nil + if scale then + C.position[frame:GetName()]["scale"] = frame:GetScale() + end end -- [ Update Movable ]