movables: new approach to handle movable frames

This commit is contained in:
shagu
2016-11-17 20:55:07 +01:00
parent 1a0d2d6e4e
commit 92721c57f7
12 changed files with 98 additions and 105 deletions
+9 -1
View File
@@ -26,6 +26,7 @@ pfUI.cache = {}
pfUI.module = {}
pfUI.modules = {}
pfUI.environment = {}
pfUI.movables = {}
pfLocaleClass = {}
pfLocaleBagtypes = {}
@@ -90,7 +91,14 @@ pfUI.backdrop_underline = {
pfUI.utils = CreateFrame("Frame",nil,UIParent)
function pfUI.utils:loadPosition(frame)
function pfUI.utils:UpdateMovable(frame)
local name = frame:GetName()
if not pfUI.movables[name] then
pfUI.movables[name] = true
table.insert(pfUI.movables, name)
end
if pfUI_config["position"][frame:GetName()] then
if pfUI_config["position"][frame:GetName()]["scale"] then
frame:SetScale(pfUI_config["position"][frame:GetName()].scale)