Example #1
0
void ColorPicker::UpdateColorControls( Gwen::String name, Gwen::Color col, int sliderVal )
{
	Base* el = FindChildByName( name, true );
	
	ColorDisplay* disp = el ? el->DynamicCastColorDisplay() : 0;
	disp->SetColor( col );

	HorizontalSlider* slider = FindChildByName( name + "Slider", true )->DynamicCastHorizontalSlider();
	slider->SetValue( sliderVal );

	TextBoxNumeric* box = FindChildByName( name + "Box", true )->DynamicCastTextBoxNumeric();
	box->SetText( Gwen::Utility::ToString( sliderVal ) );
}