View Single Post
  #18  
Unread 09-27-2010, 01:35 PM
Kragenwar Kragenwar is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Sep 2010
Posts: 26
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.
Reply With Quote