From 5e52281c6e572d8c6ff83239fc4a36e4230850b9 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 10 Aug 2012 19:43:49 +0200 Subject: [PATCH] CHANGED: #1471 CCtrlTabButton fields can now be serialized. --HG-- branch : gsoc2012-gui-editor --- code/nel/include/nel/gui/group_tab.h | 1 + code/nel/src/gui/group_tab.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/code/nel/include/nel/gui/group_tab.h b/code/nel/include/nel/gui/group_tab.h index f294e65d4..463301c17 100644 --- a/code/nel/include/nel/gui/group_tab.h +++ b/code/nel/include/nel/gui/group_tab.h @@ -157,6 +157,7 @@ namespace NLGUI void setProperty( const std::string &name, const std::string &value ); std::string getProperty( const std::string &name ) const; + xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const; virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); diff --git a/code/nel/src/gui/group_tab.cpp b/code/nel/src/gui/group_tab.cpp index bf08857c4..0987fa56b 100644 --- a/code/nel/src/gui/group_tab.cpp +++ b/code/nel/src/gui/group_tab.cpp @@ -792,6 +792,17 @@ namespace NLGUI 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) {