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