diff --git a/code/nel/include/nel/gui/dbview_digit.h b/code/nel/include/nel/gui/dbview_digit.h index 05a5db6b2..ce4d27f04 100644 --- a/code/nel/include/nel/gui/dbview_digit.h +++ b/code/nel/include/nel/gui/dbview_digit.h @@ -38,6 +38,7 @@ namespace NLGUI /// Constructor CDBViewDigit(const TCtorParam ¶m); + std::string getProperty( const std::string &name ) const; virtual bool parse (xmlNodePtr cur, CInterfaceGroup * parentGroup); virtual void draw (); virtual void updateCoords(); diff --git a/code/nel/src/gui/dbview_digit.cpp b/code/nel/src/gui/dbview_digit.cpp index f8affb858..ac040cd3d 100644 --- a/code/nel/src/gui/dbview_digit.cpp +++ b/code/nel/src/gui/dbview_digit.cpp @@ -38,6 +38,35 @@ namespace NLGUI } + std::string CDBViewDigit::getProperty( const std::string &name ) const + { + if( name == "value" ) + { + if( _Number.getNodePtr() != NULL ) + return _Number.getNodePtr()->getFullName(); + else + return ""; + } + else + if( name == "numdigit" ) + { + return toString( _NumDigit ); + } + else + if( name == "wspace" ) + { + return toString( _WSpace ); + } + else + if( name == "color" ) + { + return toString( _Color ); + } + else + return CViewBase::getProperty( name ); + } + + // *************************************************************************** bool CDBViewDigit::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup) { diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewDigit.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewDigit.xml new file mode 100644 index 000000000..c83a9722f --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewDigit.xml @@ -0,0 +1,32 @@ +<widget> + <header> + <name>DBViewDigit</name> + <guiname>CDBViewDigit</guiname> + <ancestor>CtrlBase</ancestor> + <description></description> + <abstract>false</abstract> + <icon></icon> + </header> + <properties> + <property> + <name>value</name> + <type>string</type> + <default></default> + </property> + <property> + <name>numdigit</name> + <type>int</type> + <default>2</default> + </property> + <property> + <name>wspace</name> + <type>int</type> + <default>-1</default> + </property> + <property> + <name>color</name> + <type>string</type> + <default>255 255 255 255</default> + </property> + </properties> +</widget>