From 265effe9a731c2cd5ac520d5bac4c22906c30fe6 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Mon, 6 Aug 2012 20:11:22 +0200 Subject: [PATCH] CHANGED: Implemented property setting for CInterfaceGroupWheel. --- code/nel/include/nel/gui/group_wheel.h | 1 + code/nel/src/gui/group_wheel.cpp | 29 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/code/nel/include/nel/gui/group_wheel.h b/code/nel/include/nel/gui/group_wheel.h index 37c7d377f..8cb077ee4 100644 --- a/code/nel/include/nel/gui/group_wheel.h +++ b/code/nel/include/nel/gui/group_wheel.h @@ -32,6 +32,7 @@ namespace NLGUI CInterfaceGroupWheel(const TCtorParam ¶m); std::string getProperty( const std::string &name ) const; + void setProperty( const std::string &name, const std::string &value ); /// Coming from CInterfaceElement virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup); diff --git a/code/nel/src/gui/group_wheel.cpp b/code/nel/src/gui/group_wheel.cpp index c21ec2cb9..6a9818ea2 100644 --- a/code/nel/src/gui/group_wheel.cpp +++ b/code/nel/src/gui/group_wheel.cpp @@ -57,6 +57,35 @@ namespace NLGUI return CInterfaceGroup::getProperty( name ); } + void CInterfaceGroupWheel::setProperty( const std::string &name, const std::string &value ) + { + if( name == "on_wheel_up" ) + { + _AHWheelUp = CAHManager::getInstance()->getAH( value, std::string() ); + return; + } + else + if( name == "on_wheel_up_params" ) + { + _AHWheelUpParams = value; + return; + } + else + if( name == "on_wheel_down" ) + { + _AHWheelDown = CAHManager::getInstance()->getAH( value, std::string() ); + return; + } + else + if( name == "on_wheel_down_params" ) + { + _AHWheelDownParams = value; + return; + } + else + CInterfaceGroup::setProperty( name, value ); + } + // ***************************************************************************************************************** bool CInterfaceGroupWheel::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) {