open it there again next time
FGDialog::FGDialog (SGPropertyNode * props)
: _object(0),
- _gui((NewGUI *)globals->get_subsystem("gui"))
+ _gui((NewGUI *)globals->get_subsystem("gui")),
+ _props(props)
{
display(props);
}
FGDialog::~FGDialog ()
{
+ int x, y;
+ _object->getAbsolutePosition(&x, &y);
+ _props->setIntValue("lastx", x);
+ _props->setIntValue("lasty", y);
puDeleteObject(_object);
unsigned int i;
// overridden by a top level font definition.
puFont * _font;
+ // The source xml tree, so that we can pass data back, such as the
+ // last position.
+ SGPropertyNode *_props;
+
// PUI provides no way for userdata to be deleted automatically
// with a GUI object, so we have to keep track of all the special
// data we allocated and then free it manually when the dialog