CHANGED: #1471 CCtrlTabButton fields can now be serialized.

This commit is contained in:
dfighter1985 2012-08-10 19:43:49 +02:00
parent 6616577975
commit 17215417e3
2 changed files with 12 additions and 0 deletions

View file

@ -157,6 +157,7 @@ namespace NLGUI
void setProperty( const std::string &name, const std::string &value ); void setProperty( const std::string &name, const std::string &value );
std::string getProperty( const std::string &name ) const; std::string getProperty( const std::string &name ) const;
xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const;
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);

View file

@ -792,6 +792,17 @@ namespace NLGUI
CCtrlTextButton::setProperty( name, value ); CCtrlTextButton::setProperty( name, value );
} }
xmlNodePtr CCtrlTabButton::serialize( xmlNodePtr parentNode, const char *type ) const
{
xmlNodePtr node = CCtrlTextButton::serialize( parentNode, type );
if( node == NULL )
return NULL;
xmlNewProp( node, BAD_CAST "group", BAD_CAST _AssociatedGroup.c_str() );
return node;
}
// *************************************************************************** // ***************************************************************************
bool CCtrlTabButton::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) bool CCtrlTabButton::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
{ {