Quote:
Originally Posted by Olenn
AWESOME!
That gives me tons to work with. It is now saving the position to the file, but when I click reload it still resets it to 100 x 100.
But at least I have something to work for.
Much appreciated everyone!
|
Thats fantastic. I have a feeling PositionChanged is not firing. You could try getting rid of
Code:
----SAVE CURENT POSITION WHEN MOVED---
self.PositionChanged=function(sender,args)
self.Data.x,self.Data.y=self:GetPosition()
Turbine.PluginData.Save( Turbine.DataScope.Character, "Satchel", self.Data );
end
and then do this in your MouseUp Handler instead
Code:
self.resizeHandle.MouseUp = function( sender, args )
if (sender.dragging) then
self.Data.x,self.Data.y=self:GetPosition();
end
sender.dragging = false;
end
That way you will be writing the new position to Data whenever the user releases the mouse after dragging, and saving the position to the settings file on unload.