Hello!
I'm having an issue with moving objects and keeping their positions on the screen when loading saved variables after reloading the UI.
Normal Layout
Layout after moving objects
Layout after reloading UI
Setting data to Saved Variables (after finishing with move)
Lua Code:
point,_,relativePoint,x,y = LargeIconGrpTop:GetPoint(1);
Auras.db.char.frames.eleGrp.LargeIconGrpTopEle.point = point;
Auras.db.char.frames.eleGrp.LargeIconGrpTopEle.relativeTo = "AuraGroupEle";
Auras.db.char.frames.eleGrp.LargeIconGrpTopEle.relativePoint = relativePoint;
Auras.db.char.frames.eleGrp.LargeIconGrpTopEle.x = x;
Auras.db.char.frames.eleGrp.LargeIconGrpTopEle.y = y;
Setting Point(s) upon "Auras:OnEnable()"
Lua Code:
local function InitializeGroup(group,width,height,point,relativeTo,relativePoint,x,y)
if (width ~= nil) then
group:SetWidth(width);
group:SetHeight(height);
end
group:ClearAllPoints();
--group:SetPoint(point,(SSA[relativeTo] or UIParent),relativePoint,x,y); (what I've also tried)
group:SetPoint(point,x,y)
end
local dbEle = Auras.db.char.frames.eleGrp;
for groupObj in pairs(dbEle) do
InitializeGroup(SSA[groupObj],dbEle[groupObj].width,dbEle[groupObj].height,dbEle[groupObj].point,SSA[dbEle[groupObj].relativeTo],dbEle[groupObj].relativePoint,dbEle[groupObj].x,dbEle[groupObj].y);
end