View Single Post
  #5  
Unread 09-26-2010, 12:37 PM
Olenn's Avatar
Olenn Olenn is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Sep 2010
Posts: 47
Thanks, but I am still a little lost. What I have been trying to add is a code that looks to see if the data file exists and if it does use that position. If it doesn't then it uses a default set of values. I am still not sure where all of this goes.

I tried to start simple...this is what I have been trying (without the checking to see if the file exists or not)

Code:
SatchelWindow = class( Turbine.UI.Window );
Data = Turbine.PluginData.Load( Turbine.DataScope.Character, "SatchelData")

function SatchelWindow:Constructor()
----CREATE THE WINDOW----
	Turbine.UI.Lotro.Window.Constructor( self );
	self:SetText("Satchel");
	self:SetSize( 325, 275 );
	self:SetPosition( Data.x , Data.y );
----SAVE WINDOW POSITION----
	Window.PositionChanged=function(sender,args)
		Data.x,Data.y=Window:GetPosition()
	end
That is as far as I have (unsuccessfully) gotten. Does the file save on logoff or does it save when the code runs?


I guess its off to borders to find an Lua book...

Last edited by Olenn : 09-26-2010 at 12:39 PM.
Reply With Quote