Originally Posted by zireko
I understand that. Where my problem is, I don't know how to do the code to get the frame location and save the frame location yet.
|
You can visit wiki to find out.
Lua will save/load only specific tables, you must point manually which one.
As for getting x/y. You can try this:
Saving location to table:
Lua Code:
function MouseUp(self)
local name = self:GetName()
local left = self:GetLeft()
local top = self:GetTop()
if name=="" or name ==nil then end
d("Position of "..tostring(name).." saved")
MB.params[name]={left,top}
end
Using loaded data:
Lua Code:
MB_UI.Menu:SetAnchor(TOPLEFT,MBUI,TOPLEFT,MB.params.MBUI_Menu[1],MB.params.MBUI_Menu[2])
And you have to initialize save/load to SavedVariables.
Be warned, if you are getting topleft coords, you will have to create anchor with topleft attributes.