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];
+
+ SG_LOG(SG_GENERAL, SG_ALERT, "dialog '" << name << "' missing");
+ return 0;
+}
+
void
NewGUI::setActiveDialog (FGDialog * dialog)
{
delete _menubar;
_menubar = 0;
_dialog_props.clear();
+ _itt_t it;
+ for (it = _colors.begin(); it != _colors.end(); ++it)
+ delete it->second;
_colors.clear();
}
void
NewGUI::setStyle (void)
{
+ _itt_t it;
+ for (it = _colors.begin(); it != _colors.end(); ++it)
+ delete it->second;
_colors.clear();
// set up the traditional colors as default
}
bool
-FGColor::merge(const FGColor& color)
+FGColor::merge(const FGColor *color)
{
bool dirty = false;
- if (color._red >= 0.0)
- _red = color._red, dirty = true;
- if (color._green >= 0.0)
- _green = color._green, dirty = true;
- if (color._blue >= 0.0)
- _blue = color._blue, dirty = true;
- if (color._alpha >= 0.0)
- _alpha = color._alpha, dirty = true;
+ if (color && color->_red >= 0.0)
+ _red = color->_red, dirty = true;
+ if (color && color->_green >= 0.0)
+ _green = color->_green, dirty = true;
+ if (color && color->_blue >= 0.0)
+ _blue = color->_blue, dirty = true;
+ if (color && color->_alpha >= 0.0)
+ _alpha = color->_alpha, dirty = true;
return dirty;
}