-
-/**
- * @brief Creates a background with a linear gradient which matches parent size & is placed in the center.
- */
-Actor CreateBackground()
-{
- Actor background = Control::New();
- background.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- background.SetParentOrigin( ParentOrigin::CENTER );
- background.SetProperty(
- Control::Property::BACKGROUND,
- Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::GRADIENT )
- .Add( GradientVisual::Property::STOP_COLOR, Property::Array().Add( BACKGROUND_GRADIENT_1 )
- .Add( BACKGROUND_GRADIENT_2 ) )
- .Add( GradientVisual::Property::START_POSITION, BACKGROUND_GRADIENT_START_POSITION )
- .Add( GradientVisual::Property::END_POSITION, BACKGROUND_GRADIENT_END_POSITION ) );
- return background;
-}
-
-/**
- * @brief Create a control with a circular gradient & a specific size & is placed in the center of its parent.
- *
- * @param[in] size The size we want the control to be.
- */
-Actor CreateTouchControl( const Vector2& size )
-{
- Actor touchControl = Control::New();
- touchControl.SetSize( size );
- touchControl.SetParentOrigin( ParentOrigin::CENTER );
- touchControl.SetProperty(
- Control::Property::BACKGROUND,
- Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::GRADIENT )
- .Add( GradientVisual::Property::STOP_COLOR, Property::Array().Add( CONTROL_GRADIENT_1 )
- .Add( CONTROL_GRADIENT_2 ) )
- .Add( GradientVisual::Property::CENTER, CONTROL_GRADIENT_CENTER )
- .Add( GradientVisual::Property::RADIUS, CONTROL_GRADIENT_RADIUS )
- );
- return touchControl;
-}