mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-13 18:59:05 +00:00
CHANGED: #1471 Implemented property querying for CCtrlTabButton.
This commit is contained in:
parent
ea8ed3fcf5
commit
c89b3a26cc
4 changed files with 39 additions and 14 deletions
|
@ -152,6 +152,8 @@ namespace NLGUI
|
||||||
|
|
||||||
CCtrlTabButton(const TCtorParam ¶m);
|
CCtrlTabButton(const TCtorParam ¶m);
|
||||||
|
|
||||||
|
std::string getProperty( const std::string &name ) const;
|
||||||
|
|
||||||
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
|
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
|
||||||
|
|
||||||
virtual void setActive(bool state);
|
virtual void setActive(bool state);
|
||||||
|
|
|
@ -729,6 +729,14 @@ namespace NLGUI
|
||||||
_BlinkState = false;
|
_BlinkState = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string CCtrlTabButton::getProperty( const std::string &name ) const
|
||||||
|
{
|
||||||
|
if( name == "group" )
|
||||||
|
return _AssociatedGroup;
|
||||||
|
else
|
||||||
|
return CCtrlTextButton::getProperty( name );
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
bool CCtrlTabButton::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
bool CCtrlTabButton::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
||||||
{
|
{
|
||||||
|
|
|
@ -243,27 +243,25 @@ namespace GUIEditor
|
||||||
|
|
||||||
std::vector< SPropEntry > &props = info->props;
|
std::vector< SPropEntry > &props = info->props;
|
||||||
|
|
||||||
std::map< std::string, SWidgetInfo >::iterator itr2 =
|
SWidgetInfo *info2 = info;
|
||||||
widgetInfo->find( info->ancestor );
|
|
||||||
if( itr2 == widgetInfo->end() )
|
|
||||||
return;
|
|
||||||
SWidgetInfo *info2 = &(itr2->second);
|
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
if( info2->ancestor.empty() )
|
||||||
|
break;
|
||||||
|
|
||||||
|
std::map< std::string, SWidgetInfo >::iterator itr2 =
|
||||||
|
widgetInfo->find( info2->ancestor );
|
||||||
|
if( itr2 == widgetInfo->end() )
|
||||||
|
break;
|
||||||
|
|
||||||
|
info2 = &( itr2->second );
|
||||||
|
|
||||||
for( std::vector< SPropEntry >::iterator propItr = info2->props.begin(); propItr != info2->props.end(); ++propItr )
|
for( std::vector< SPropEntry >::iterator propItr = info2->props.begin(); propItr != info2->props.end(); ++propItr )
|
||||||
props.push_back( *propItr );
|
props.push_back( *propItr );
|
||||||
|
|
||||||
if( !info2->resolved && !info2->ancestor.empty() )
|
|
||||||
{
|
|
||||||
itr2 = widgetInfo->find( info2->ancestor );
|
|
||||||
if( itr2 != widgetInfo->end() )
|
|
||||||
info2 = &(itr2->second);
|
|
||||||
else
|
|
||||||
info2 = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
while( ( info2 != NULL ) && !info2->resolved && !info2->ancestor.empty() );
|
while( !info2->resolved );
|
||||||
|
|
||||||
info->resolved = true;
|
info->resolved = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
<widget>
|
||||||
|
<header>
|
||||||
|
<name>CtrlTabButton</name>
|
||||||
|
<guiname>CCtrlTabButton</guiname>
|
||||||
|
<ancestor>CtrlTextButton</ancestor>
|
||||||
|
<description></description>
|
||||||
|
<abstract>false</abstract>
|
||||||
|
<icon></icon>
|
||||||
|
</header>
|
||||||
|
<properties>
|
||||||
|
<property>
|
||||||
|
<name>group</name>
|
||||||
|
<type>string</type>
|
||||||
|
<default></default>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</widget>
|
Loading…
Reference in a new issue