From 09458f2452a9c74c1615e01ff592d63591f40300 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 12 Aug 2012 01:32:21 +0200 Subject: [PATCH] CHANGED: #1471 CViewTextIDFormated fields can now be serialized. --- code/nel/include/nel/gui/view_text_id_formated.h | 1 + code/nel/src/gui/view_text_id_formated.cpp | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/code/nel/include/nel/gui/view_text_id_formated.h b/code/nel/include/nel/gui/view_text_id_formated.h index 0965099c0..a61956471 100644 --- a/code/nel/include/nel/gui/view_text_id_formated.h +++ b/code/nel/include/nel/gui/view_text_id_formated.h @@ -41,6 +41,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 checkCoords(); const ucstring &getFormatString() const { return _FormatString; } diff --git a/code/nel/src/gui/view_text_id_formated.cpp b/code/nel/src/gui/view_text_id_formated.cpp index 715ac152a..8f45a113b 100644 --- a/code/nel/src/gui/view_text_id_formated.cpp +++ b/code/nel/src/gui/view_text_id_formated.cpp @@ -48,6 +48,18 @@ namespace NLGUI CViewTextID::setProperty( name, value ); } + xmlNodePtr CViewTextIDFormated::serialize( xmlNodePtr parentNode, const char *type ) const + { + xmlNodePtr node = CViewTextID::serialize( parentNode, type ); + if( node == NULL ) + return NULL; + + xmlSetProp( node, BAD_CAST "type", BAD_CAST "text_id_formated" ); + xmlSetProp( node, BAD_CAST "format", BAD_CAST getFormatString().c_str() ); + + return node; + } + // ********************************************************************************* bool CViewTextIDFormated::parse(xmlNodePtr cur,CInterfaceGroup * parentGroup) {