From 68b83eab1fa9d6d305ed4c002815cb458c457d62 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 4 Aug 2012 18:17:52 +0200 Subject: [PATCH] CHANGED: #1471 Implemented property setting for CDBViewQuantity. --- code/nel/include/nel/gui/dbview_quantity.h | 1 + code/nel/src/gui/dbview_quantity.cpp | 24 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/code/nel/include/nel/gui/dbview_quantity.h b/code/nel/include/nel/gui/dbview_quantity.h index cc6b58ec4..8e6c7e5a8 100644 --- a/code/nel/include/nel/gui/dbview_quantity.h +++ b/code/nel/include/nel/gui/dbview_quantity.h @@ -40,6 +40,7 @@ namespace NLGUI CDBViewQuantity(const TCtorParam ¶m); 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 draw (); diff --git a/code/nel/src/gui/dbview_quantity.cpp b/code/nel/src/gui/dbview_quantity.cpp index eeb334787..e0515ea41 100644 --- a/code/nel/src/gui/dbview_quantity.cpp +++ b/code/nel/src/gui/dbview_quantity.cpp @@ -62,6 +62,30 @@ namespace NLGUI return CViewText::getProperty( name ); } + + void CDBViewQuantity::setProperty( const std::string &name, const std::string &value ) + { + if( name == "value" ) + { + _Number.link( value.c_str() ); + return; + } + else + if( name == "valuemax" ) + { + _NumberMax.link( value.c_str() ); + return; + } + else + if( name == "emptytext" ) + { + _EmptyText = value; + return; + } + else + CViewText::setProperty( name, value ); + } + // *************************************************************************** bool CDBViewQuantity::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup) {