From eac2de77daf7aab4ed449471f9eefe629d23f7db Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Tue, 14 Aug 2012 19:43:43 +0200 Subject: [PATCH] CHANGED: #1471 CGroupTab fields can now be serialized. --- code/nel/include/nel/gui/group_tab.h | 1 + code/nel/src/gui/group_tab.cpp | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/code/nel/include/nel/gui/group_tab.h b/code/nel/include/nel/gui/group_tab.h index 463301c17..e4f5d4c6c 100644 --- a/code/nel/include/nel/gui/group_tab.h +++ b/code/nel/include/nel/gui/group_tab.h @@ -49,6 +49,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 updateCoords (); diff --git a/code/nel/src/gui/group_tab.cpp b/code/nel/src/gui/group_tab.cpp index 1ee559b99..bf3a094fc 100644 --- a/code/nel/src/gui/group_tab.cpp +++ b/code/nel/src/gui/group_tab.cpp @@ -88,6 +88,20 @@ namespace NLGUI CInterfaceGroup::setProperty( name, value ); } + xmlNodePtr CGroupTab::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 "tab" ); + xmlSetProp( node, BAD_CAST "hide_out_tabs", BAD_CAST toString( _HideOutTabs ).c_str() ); + xmlSetProp( node, BAD_CAST "onchange", BAD_CAST _AHOnChange.c_str() ); + xmlSetProp( node, BAD_CAST "onchange_params", BAD_CAST _ParamsOnChange.c_str() ); + + return node; + } + // *************************************************************************** bool CGroupTab::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) {