From dd3a746fbbaca91c0c3c7872c9e4e40ff81e2b23 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Mon, 13 Aug 2012 02:06:54 +0200 Subject: [PATCH] CHANGED: #1471 CGroupFrame fields can now be serialized. --- code/nel/include/nel/gui/group_frame.h | 1 + code/nel/src/gui/group_frame.cpp | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/code/nel/include/nel/gui/group_frame.h b/code/nel/include/nel/gui/group_frame.h index dec2ac767..0efaa2188 100644 --- a/code/nel/include/nel/gui/group_frame.h +++ b/code/nel/include/nel/gui/group_frame.h @@ -42,6 +42,7 @@ namespace NLGUI std::string getProperty( const std::string &name ) const; void setProperty( const std::string &name, const std::string &value ); + xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const; virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); virtual void draw (); diff --git a/code/nel/src/gui/group_frame.cpp b/code/nel/src/gui/group_frame.cpp index 61a6e48d6..19e6f386e 100644 --- a/code/nel/src/gui/group_frame.cpp +++ b/code/nel/src/gui/group_frame.cpp @@ -92,6 +92,20 @@ namespace NLGUI CInterfaceGroup::setProperty( name, value ); } + xmlNodePtr CGroupFrame::serialize( xmlNodePtr parentNode, const char *type ) const + { + xmlNodePtr node = CInterfaceGroup::serialize( parentNode, type ); + if( node == NULL ) + return NULL; + + xmlSetProp( node, BAD_CAST "type", BAD_CAST "frame" ); + xmlSetProp( node, BAD_CAST "display", BAD_CAST NLMISC::toString( _DisplayFrame ).c_str() ); + xmlSetProp( node, BAD_CAST "color", BAD_CAST NLMISC::toString( _Color ).c_str() ); + xmlSetProp( node, BAD_CAST "options", BAD_CAST _Options.c_str() ); + + return node; + } + // *************************************************************************** bool CGroupFrame::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) {