What I am trying to do is two fold. I want the window to have a default location and size when the addon is first installed. After that when the user moves or resizes the window, I want the window to save its size and location to a file so that the next time the user runs the game the window is in the same place and the same size that they left it in.
I tried your code and it does it still resets to 100 x 100 when I hit reload in plugin manager. I have to go to work now, but I will keep hammering away at it tomorrow. Thanks for all your help. |
Quote:
Also just noticed that you are loading from "SatchelData" and saving to "Satchel".... Didn't notice it before, but those save/load calls need to match. That was probably the problem in the first place so you may need to go back to the self.PositionChanged function and get rid of that line I had you add to self.resizeHandle.MouseDown. |
I changed the SatchelData, thanks for spotting that.
I am not "making" the windows movable...they just are...is that wrong? |
No it's not wrong. I was mistaken, didn't realize that a turbine.ui.window was already moveable if you have a title bar on it. Just my lack of experience showing threw :p
Sorry for leading you in the wrong direction yesterday. You were actually correct in the first place with your PositionChanged function. So make sure you change your resizeHandle.MouseUp function back to the way it was before I suggested you change it. Hope it all works out. |
For everyone that helped, THANK YOU!!!
Major break through today. The "save position" issue is resolved. It is now working properly and I have learned a ton in the process... My hat is off to you all. For anyone that is curious about the working code here it is. Code:
SatchelWindow = class( Turbine.UI.Window ); |
Updated to save position information as well,
Code:
SatchelWindow = class( Turbine.UI.Window ); |
All times are GMT -5. The time now is 05:59 PM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI