CHANGED: #1471 Widgets can now be flagged as non-serializable, in which case they won't be serialized.

This commit is contained in:
dfighter1985 2012-08-15 16:35:21 +02:00
parent 37f373fc44
commit 15683e0f50
2 changed files with 15 additions and 0 deletions

View file

@ -107,6 +107,8 @@ namespace NLGUI
_AvoidResizeParent= false;
editorSelected = false;
serializable = true;
}
// dtor
@ -478,6 +480,9 @@ namespace NLGUI
void setPosParent( const std::string &id );
void setSizeParent( const std::string &id );
void setSerializable( bool b ){ serializable = b; }
bool IsSerializable() const{ return serializable; }
protected:
bool editorSelected;
@ -539,6 +544,7 @@ namespace NLGUI
private:
//void snapSize();
bool serializable;
typedef NLMISC::CSmartPtr<CInterfaceLink> TLinkSmartPtr;
typedef std::vector<TLinkSmartPtr> TLinkVect;

View file

@ -721,6 +721,9 @@ namespace NLGUI
std::vector< CInterfaceGroup* >::const_iterator itr;
for( itr = _ChildrenGroups.begin(); itr != _ChildrenGroups.end(); ++itr )
{
if( !(*itr)->IsSerializable() )
continue;
(*itr)->serialize( parentNode, "group" );
}
@ -732,6 +735,9 @@ namespace NLGUI
std::vector< CCtrlBase* >::const_iterator itr;
for( itr = _Controls.begin(); itr != _Controls.end(); ++itr )
{
if( !(*itr)->IsSerializable() )
continue;
(*itr)->serialize( parentNode, "ctrl" );
}
@ -743,6 +749,9 @@ namespace NLGUI
std::vector< CViewBase* >::const_iterator itr;
for( itr = _Views.begin(); itr != _Views.end(); ++itr )
{
if( !(*itr)->IsSerializable() )
continue;
(*itr)->serialize( parentNode, "view" );
}