Ejemplo n.º 1
0
void ColorPicker::UpdateColorControls( Gwen::String name, Gwen::Color col, int sliderVal )
{
	ColorDisplay* disp = gwen_cast<ColorDisplay>(FindChildByName( name, true ) );
	disp->SetColor( col );

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

	TextBoxNumeric* box = gwen_cast<TextBoxNumeric>( FindChildByName( name + "Box", true ) );
	box->SetText( Gwen::Utility::ToString( sliderVal ) );
}
Ejemplo n.º 2
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 ) );
}