void ColorPicker::SlidersMoved( Gwen::Controls::Base* control ) { HorizontalSlider* slider = control->DynamicCastHorizontalSlider(); if (slider) SetColorByName( GetColorFromName( slider->GetName() ), slider->GetValue() ); UpdateControls(); //SetColor( Gwen::Color( redSlider->GetValue(), greenSlider->GetValue(), blueSlider->GetValue(), alphaSlider->GetValue() ) ); }
void ColorPicker::SlidersMoved( Gwen::Controls::Base* control ) { /* HorizontalSlider* redSlider = gwen_cast<HorizontalSlider>( FindChildByName( "RedSlider", true ) ); HorizontalSlider* greenSlider = gwen_cast<HorizontalSlider>( FindChildByName( "GreenSlider", true ) ); HorizontalSlider* blueSlider = gwen_cast<HorizontalSlider>( FindChildByName( "BlueSlider", true ) ); HorizontalSlider* alphaSlider = gwen_cast<HorizontalSlider>( FindChildByName( "AlphaSlider", true ) ); */ HorizontalSlider* slider = gwen_cast<HorizontalSlider>( control ); if (slider) SetColorByName( GetColorFromName( slider->GetName() ), slider->GetValue() ); UpdateControls(); //SetColor( Gwen::Color( redSlider->GetValue(), greenSlider->GetValue(), blueSlider->GetValue(), alphaSlider->GetValue() ) ); }