CHANGED: #1471 Implemented property querying for CInterfaceGroupWheel.

This commit is contained in:
dfighter1985 2012-07-31 22:19:45 +02:00
parent 464ab1f394
commit 4f7743eb80
3 changed files with 60 additions and 0 deletions

View file

@ -30,6 +30,9 @@ namespace NLGUI
public:
/// Constructor
CInterfaceGroupWheel(const TCtorParam &param);
std::string getProperty( const std::string &name ) const;
/// Coming from CInterfaceElement
virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup);
virtual bool handleEvent (const NLGUI::CEventDescriptor &event);

View file

@ -32,6 +32,31 @@ namespace NLGUI
_AHWheelDown = NULL;
}
std::string CInterfaceGroupWheel::getProperty( const std::string &name ) const
{
if( name == "on_wheel_up" )
{
return CAHManager::getInstance()->getActionHandlerName( _AHWheelUp );
}
else
if( name == "on_wheel_up_params" )
{
return _AHWheelUpParams;
}
else
if( name == "on_wheel_down" )
{
return CAHManager::getInstance()->getActionHandlerName( _AHWheelDown );
}
else
if( name == "on_wheel_down_params" )
{
return _AHWheelDownParams;
}
else
return CInterfaceGroup::getProperty( name );
}
// *****************************************************************************************************************
bool CInterfaceGroupWheel::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
{

View file

@ -0,0 +1,32 @@
<widget>
<header>
<name>InterfaceGroupWheel</name>
<guiname>CInterfaceGroupWheel</guiname>
<ancestor>InterfaceGroup</ancestor>
<description></description>
<abstract>false</abstract>
<icon></icon>
</header>
<properties>
<property>
<name>on_wheel_up</name>
<type>string</type>
<default></default>
</property>
<property>
<name>on_wheel_up_params</name>
<type>string</type>
<default></default>
</property>
<property>
<name>on_wheel_down</name>
<type>string</type>
<default></default>
</property>
<property>
<name>on_wheel_down_params</name>
<type>string</type>
<default></default>
</property>
</properties>
</widget>