mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-25 16:26:18 +00:00
CHANGED: #1471 CCtrlTooltip fields can now be serialized.
This commit is contained in:
parent
deb5d7c709
commit
01957ebf8d
3 changed files with 17 additions and 0 deletions
|
@ -41,6 +41,7 @@ namespace NLGUI
|
|||
|
||||
virtual bool handleEvent (const NLGUI::CEventDescriptor& eventDesc);
|
||||
virtual void draw();
|
||||
xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const;
|
||||
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
|
||||
// Can do nothing with tooltip (but display it :) )
|
||||
virtual bool isCapturable() const {return false;}
|
||||
|
|
|
@ -398,6 +398,9 @@ namespace NLGUI
|
|||
if( node == NULL )
|
||||
return NULL;
|
||||
|
||||
if( xmlGetProp( node, BAD_CAST "type" ) == NULL )
|
||||
xmlSetProp( node, BAD_CAST "type", BAD_CAST "scroll" );
|
||||
|
||||
xmlSetProp( node, BAD_CAST "tx_bottomleft", BAD_CAST getTextureBottomOrLeft().c_str() );
|
||||
xmlSetProp( node, BAD_CAST "tx_middle", BAD_CAST getTextureMiddle().c_str() );
|
||||
xmlSetProp( node, BAD_CAST "tx_topright", BAD_CAST getTextureTopOrRight().c_str() );
|
||||
|
|
|
@ -44,6 +44,19 @@ namespace NLGUI
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
xmlNodePtr CCtrlToolTip::serialize( xmlNodePtr parentNode, const char *type ) const
|
||||
{
|
||||
xmlNodePtr node = CCtrlBase::serialize( parentNode, type );
|
||||
if( node == NULL )
|
||||
return NULL;
|
||||
|
||||
if( xmlGetProp( node, BAD_CAST "type" ) == NULL )
|
||||
xmlSetProp( node, BAD_CAST "type", BAD_CAST "tooltip" );
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
bool CCtrlToolTip::parse(xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue