mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-25 16:26:18 +00:00
CHANGED: #1471 Implemented property setting for CDBViewDigit.
This commit is contained in:
parent
d831e36b43
commit
a0f0ef0ac8
2 changed files with 37 additions and 0 deletions
|
@ -39,6 +39,7 @@ namespace NLGUI
|
||||||
CDBViewDigit(const TCtorParam ¶m);
|
CDBViewDigit(const TCtorParam ¶m);
|
||||||
|
|
||||||
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 draw ();
|
virtual void draw ();
|
||||||
virtual void updateCoords();
|
virtual void updateCoords();
|
||||||
|
|
|
@ -67,6 +67,42 @@ namespace NLGUI
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CDBViewDigit::setProperty( const std::string &name, const std::string &value )
|
||||||
|
{
|
||||||
|
if( name == "value" )
|
||||||
|
{
|
||||||
|
_Number.link( value.c_str() );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if( name == "numdigit" )
|
||||||
|
{
|
||||||
|
sint32 i;
|
||||||
|
if( fromString( value, i ) )
|
||||||
|
_NumDigit = i;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if( name == "wspace" )
|
||||||
|
{
|
||||||
|
sint32 i;
|
||||||
|
if( fromString( value, i ) )
|
||||||
|
_WSpace = i;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if( name == "color" )
|
||||||
|
{
|
||||||
|
CRGBA c;
|
||||||
|
if( fromString( value, c ) )
|
||||||
|
_Color = c;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
CViewBase::setProperty( name, value );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
bool CDBViewDigit::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
bool CDBViewDigit::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue