I should implement a real property for this but currently you can make it this way:
1. Create a class with default values somewhere:
2. In your plugin __init__ do this call (Defaults is the class you created in 1.):
Code: Select all
self.config = eg.GetConfig("plugins." + self.info.evalName, Defaults)
3. Now you can access and store new values to this self.config object:
Code: Select all
window.SetPosition((self.config.x, self.config.y))
...
self.config.x, self.config.y = window.GetPosition()
EG will save these values on exit and retrieve them on the next start. On the first use it will fill up the object with the default values. You can use all basic types as attributes like int, float, string, boolean and lists/tuples out of them.