CHANGED: #1471 Implemented property setting for CViewTextFormated.

--HG--
branch : gsoc2012-gui-editor
This commit is contained in:
dfighter1985 2012-08-04 02:20:50 +02:00
parent 62029159bb
commit 76e805fcbb
2 changed files with 12 additions and 0 deletions

View file

@ -47,6 +47,7 @@ namespace NLGUI
CViewTextFormated (const TCtorParam &param) : CViewText(param) CViewTextFormated (const TCtorParam &param) : CViewText(param)
{} {}
std::string getProperty( const std::string &name ) const; 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 bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup);
virtual void checkCoords(); virtual void checkCoords();
const ucstring &getFormatString() const { return _FormatString; } const ucstring &getFormatString() const { return _FormatString; }

View file

@ -35,6 +35,17 @@ namespace NLGUI
return CViewText::getProperty( name ); 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) bool CViewTextFormated::parse(xmlNodePtr cur,CInterfaceGroup * parentGroup)
{ {