mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-23 07:16:15 +00:00
CHANGED: #1471 CDBGroupSelectNumber fields can now be serialized.
This commit is contained in:
parent
65f04c6cdc
commit
0d34661c7e
2 changed files with 22 additions and 0 deletions
|
@ -46,6 +46,7 @@ namespace NLGUI
|
|||
|
||||
std::string getProperty( const std::string &name ) const;
|
||||
void setProperty( const std::string &name, const std::string &value );
|
||||
xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const;
|
||||
|
||||
/// CInterfaceGroup Interface
|
||||
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
|
||||
|
|
|
@ -125,6 +125,27 @@ namespace NLGUI
|
|||
CInterfaceGroup::setProperty( name, value );
|
||||
}
|
||||
|
||||
xmlNodePtr CDBGroupSelectNumber::serialize( xmlNodePtr parentNode, const char *type ) const
|
||||
{
|
||||
xmlNodePtr node = CInterfaceGroup::serialize( parentNode, type );
|
||||
if( node == NULL )
|
||||
return NULL;
|
||||
|
||||
xmlSetProp( node, BAD_CAST "type", BAD_CAST "select_number" );
|
||||
|
||||
if( _Number.getNodePtr() != NULL )
|
||||
xmlSetProp( node, BAD_CAST "value", BAD_CAST _Number.getNodePtr()->getFullName().c_str() );
|
||||
else
|
||||
xmlSetProp( node, BAD_CAST "value", BAD_CAST "" );
|
||||
|
||||
xmlSetProp( node, BAD_CAST "loop", BAD_CAST toString( _LoopMode ).c_str() );
|
||||
xmlSetProp( node, BAD_CAST "min", BAD_CAST toString( _MinValue ).c_str() );
|
||||
xmlSetProp( node, BAD_CAST "max", BAD_CAST toString( _MaxValue ).c_str() );
|
||||
xmlSetProp( node, BAD_CAST "delta", BAD_CAST toString( _DeltaMultiplier ).c_str() );
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
bool CDBGroupSelectNumber::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue