mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-23 07:16:15 +00:00
CHANGED: #1471 Serialize text options for Buttons with text too.
This commit is contained in:
parent
8fa283ca14
commit
79e4832373
3 changed files with 19 additions and 6 deletions
|
@ -57,6 +57,7 @@ namespace NLGUI
|
|||
std::string getProperty( const std::string &name ) const;
|
||||
void setProperty( const std::string &name, const std::string &value );
|
||||
bool setTextProperty( const std::string &name, const std::string &value );
|
||||
bool serializeTextOptions( xmlNodePtr node ) const;
|
||||
xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const;
|
||||
void parseTextOptions (xmlNodePtr cur);
|
||||
bool parse (xmlNodePtr cur, CInterfaceGroup * parentGroup);
|
||||
|
|
|
@ -444,6 +444,9 @@ namespace NLGUI
|
|||
xmlNewProp( node, BAD_CAST "force_text_over", BAD_CAST toString( _ForceTextOver ).c_str() );
|
||||
xmlNewProp( node, BAD_CAST "text_header_color", BAD_CAST toString( _TextHeaderColor ).c_str() );
|
||||
|
||||
if( _ViewText != NULL )
|
||||
_ViewText->serializeTextOptions( node );
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
|
|
|
@ -495,13 +495,8 @@ namespace NLGUI
|
|||
}
|
||||
|
||||
|
||||
xmlNodePtr CViewText::serialize( xmlNodePtr parentNode, const char *type ) const
|
||||
bool CViewText::serializeTextOptions( xmlNodePtr node ) const
|
||||
{
|
||||
xmlNodePtr node = CViewBase::serialize( parentNode, type );
|
||||
if( node == NULL )
|
||||
return NULL;
|
||||
|
||||
xmlSetProp( node, BAD_CAST "type", BAD_CAST "text" );
|
||||
xmlSetProp( node, BAD_CAST "color", BAD_CAST toString( _Color ).c_str() );
|
||||
xmlSetProp( node, BAD_CAST "global_color", BAD_CAST toString( _ModulateGlobalColor ).c_str() );
|
||||
xmlSetProp( node, BAD_CAST "fontsize",
|
||||
|
@ -544,6 +539,20 @@ namespace NLGUI
|
|||
xmlSetProp( node, BAD_CAST "clamp_right", BAD_CAST toString( _ClampRight ).c_str() );
|
||||
xmlSetProp( node, BAD_CAST "auto_clamp_offset", BAD_CAST toString( _AutoClampOffset ).c_str() );
|
||||
xmlSetProp( node, BAD_CAST "continuous_update", BAD_CAST toString( _ContinuousUpdate ).c_str() );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
xmlNodePtr CViewText::serialize( xmlNodePtr parentNode, const char *type ) const
|
||||
{
|
||||
xmlNodePtr node = CViewBase::serialize( parentNode, type );
|
||||
if( node == NULL )
|
||||
return NULL;
|
||||
|
||||
xmlSetProp( node, BAD_CAST "type", BAD_CAST "text" );
|
||||
|
||||
serializeTextOptions( node );
|
||||
|
||||
std::string hs = _Text.toString();
|
||||
|
||||
|
|
Loading…
Reference in a new issue