Add method to get the property root node of named dialogs. This is
necessary to edit dialog contents from C++, and will allow us to finally let all the hardcoded dialogs be handled by the "gui" subsystem.
This commit is contained in:
parent
ebc9ba19aa
commit
685076e9ce
2 changed files with 16 additions and 0 deletions
|
@ -142,6 +142,15 @@ NewGUI::closeDialog (const string& name)
|
||||||
return false; // dialog wasn't open...
|
return false; // dialog wasn't open...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SGPropertyNode_ptr
|
||||||
|
NewGUI::getDialog (const string &name)
|
||||||
|
{
|
||||||
|
if(_dialog_props.find(name) != _dialog_props.end())
|
||||||
|
return _dialog_props[name];
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
NewGUI::setActiveDialog (FGDialog * dialog)
|
NewGUI::setActiveDialog (FGDialog * dialog)
|
||||||
{
|
{
|
||||||
|
|
|
@ -133,6 +133,13 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual bool closeDialog (const string &name);
|
virtual bool closeDialog (const string &name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get dialog property tree's root node.
|
||||||
|
* @param name The name of the dialog box.
|
||||||
|
* @return node pointer if the dialog was found, zero otherwise.
|
||||||
|
*/
|
||||||
|
virtual SGPropertyNode_ptr getDialog (const string &name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a pointer to the current menubar.
|
* Return a pointer to the current menubar.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue