CHANGED: #1471 Implemented property querying for for CViewTextID.

This commit is contained in:
dfighter1985 2012-08-02 19:41:49 +02:00
parent 7390abe71c
commit 9a0e7661ca
3 changed files with 53 additions and 0 deletions

View file

@ -91,6 +91,7 @@ namespace NLGUI
~CViewTextID();
std::string getProperty( const std::string &name ) const;
virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup);
virtual void checkCoords();

View file

@ -46,6 +46,29 @@ namespace NLGUI
{
}
std::string CViewTextID::getProperty( const std::string &name ) const
{
if( name == "textid" )
{
if( _DBTextId.getNodePtr() != NULL )
return _DBTextId.getNodePtr()->getFullName();
else
return NLMISC::toString( _TextId );
}
else
if( name == "dynamic_string" )
{
return NLMISC::toString( _DynamicString );
}
else
if( name == "format_taged" )
{
return NLMISC::toString( _IsTextFormatTaged );
}
else
return CViewText::getProperty( name );
}
// ***************************************************************************
bool CViewTextID::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
{

View file

@ -0,0 +1,29 @@
<widget>
<header>
<name>ViewTextID</name>
<guiname>CViewTextID</guiname>
<ancestor>ViewText</ancestor>
<description></description>
<abstract>false</abstract>
<icon></icon>
</header>
<properties>
<property>
<name>text_id</name>
<type>string</type>
<default></default>
</property>
<property>
<name>dynamic_string</name>
<type>bool</type>
<default>true</default>
</property>
<property>
<name>format_taged</name>
<type>bool</type>
<default>false</default>
</property>
</properties>
</widget>