From 22eb4ff05dae27c597bcccbcb4be7a8d1283c2f0 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 4 Aug 2012 02:20:50 +0200 Subject: [PATCH] CHANGED: #1471 Implemented property setting for CViewTextFormated. --- code/nel/include/nel/gui/view_text_formated.h | 1 + code/nel/src/gui/view_text_formated.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/code/nel/include/nel/gui/view_text_formated.h b/code/nel/include/nel/gui/view_text_formated.h index 0e5d0d616..dc30682ef 100644 --- a/code/nel/include/nel/gui/view_text_formated.h +++ b/code/nel/include/nel/gui/view_text_formated.h @@ -47,6 +47,7 @@ namespace NLGUI CViewTextFormated (const TCtorParam ¶m) : CViewText(param) {} std::string getProperty( const std::string &name ) const; + void setProperty( const std::string &name, const std::string &value ); 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_formated.cpp b/code/nel/src/gui/view_text_formated.cpp index 6fdc3e5d1..ac7f36b7f 100644 --- a/code/nel/src/gui/view_text_formated.cpp +++ b/code/nel/src/gui/view_text_formated.cpp @@ -35,6 +35,17 @@ namespace NLGUI return CViewText::getProperty( name ); } + void CViewTextFormated::setProperty( const std::string &name, const std::string &value ) + { + if( name == "format" ) + { + setFormatString( value ); + return; + } + else + CViewText::setProperty( name, value ); + } + // **************************************************************************** bool CViewTextFormated::parse(xmlNodePtr cur,CInterfaceGroup * parentGroup) {