mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-24 01:48:44 +00:00
CHANGED: #1471 CCtrlTooltip fields can now be serialized.
--HG-- branch : gsoc2012-gui-editor
This commit is contained in:
parent
bffa5806ca
commit
4e00abc283
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