@ -38,6 +38,7 @@ namespace ICS
, mValue ( initialValue )
, mValue ( initialValue )
, mSymmetricAt ( symmetricAt )
, mSymmetricAt ( symmetricAt )
, mBezierStep ( bezierStep )
, mBezierStep ( bezierStep )
, mEnabled ( true )
{
{
mBezierMidPoint . x = bezierMidPointX ;
mBezierMidPoint . x = bezierMidPointX ;
mBezierMidPoint . y = bezierMidPointY ;
mBezierMidPoint . y = bezierMidPointY ;
@ -45,6 +46,11 @@ namespace ICS
setBezierFunction ( bezierMidPointY , bezierMidPointX , symmetricAt , bezierStep ) ;
setBezierFunction ( bezierMidPointY , bezierMidPointX , symmetricAt , bezierStep ) ;
}
}
void Channel : : setEnabled ( bool enabled )
{
mEnabled = enabled ;
}
float Channel : : getValue ( )
float Channel : : getValue ( )
{
{
if ( mValue = = 0 | | mValue = = 1 )
if ( mValue = = 0 | | mValue = = 1 )
@ -124,7 +130,10 @@ namespace ICS
void Channel : : update ( )
void Channel : : update ( )
{
{
if ( this - > getControlsCount ( ) = = 1 )
if ( ! mEnabled )
return ;
if ( this - > getControlsCount ( ) = = 1 )
{
{
ControlChannelBinderItem ccBinderItem = mAttachedControls . back ( ) ;
ControlChannelBinderItem ccBinderItem = mAttachedControls . back ( ) ;
float diff = ccBinderItem . control - > getValue ( ) - ccBinderItem . control - > getInitialValue ( ) ;
float diff = ccBinderItem . control - > getValue ( ) - ccBinderItem . control - > getInitialValue ( ) ;
@ -255,4 +264,4 @@ namespace ICS
t + = 1.0f / ( ( endX - startX ) / step ) ;
t + = 1.0f / ( ( endX - startX ) / step ) ;
}
}
}
}
}
}