From 5371a774869a75da5c8af6132984ee1441a49a12 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Tue, 14 Aug 2012 02:10:27 +0200 Subject: [PATCH] CHANGED: #1471 CGroupScrollText fields can now be serialized. --HG-- branch : gsoc2012-gui-editor --- code/nel/include/nel/gui/group_scrolltext.h | 1 + code/nel/src/gui/group_scrolltext.cpp | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/code/nel/include/nel/gui/group_scrolltext.h b/code/nel/include/nel/gui/group_scrolltext.h index 7494121be..f85f31879 100644 --- a/code/nel/include/nel/gui/group_scrolltext.h +++ b/code/nel/include/nel/gui/group_scrolltext.h @@ -45,6 +45,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; /// CInterfaceGroup Interface virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); diff --git a/code/nel/src/gui/group_scrolltext.cpp b/code/nel/src/gui/group_scrolltext.cpp index 42f2c26d2..d2ebfeb07 100644 --- a/code/nel/src/gui/group_scrolltext.cpp +++ b/code/nel/src/gui/group_scrolltext.cpp @@ -70,6 +70,19 @@ namespace NLGUI CInterfaceGroup::setProperty( name, value ); } + + xmlNodePtr CGroupScrollText::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 "scroll_text" ); + xmlSetProp( node, BAD_CAST "invert_scroll_bar", BAD_CAST NLMISC::toString( _InvertScrollBar ).c_str() ); + + return node; + } + //======================================================================== bool CGroupScrollText::parse(xmlNodePtr cur,CInterfaceGroup *parentGroup) {