mScrollView.TouchedSignal().Connect( this, &DaliTableView::OnScrollTouched );
mScrollViewLayer = Layer::New();
+
+ // Disable the depth test for performance
+ mScrollViewLayer.SetDepthTestDisabled( true );
mScrollViewLayer.SetAnchorPoint( AnchorPoint::CENTER );
mScrollViewLayer.SetParentOrigin( ParentOrigin::CENTER );
- mScrollViewLayer.SetDrawMode( DrawMode::OVERLAY );
mScrollViewLayer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
// Create solid background colour.
backgroundColourActor.SetParentOrigin( ParentOrigin::CENTER );
backgroundColourActor.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
backgroundColourActor.SetSizeModeFactor( Vector3( 1.0f, 1.5f, 1.0f ) );
- backgroundColourActor.SetZ( BACKGROUND_Z );
+
+ // Force the filled background right to the back
+ backgroundColourActor.SetDepthIndex( DemoHelper::BACKGROUND_DEPTH_INDEX );
mScrollViewLayer.Add( backgroundColourActor );
// Populate background and bubbles - needs to be scrollViewLayer so scroll ends show
dfActor.SetSize( Vector2( randSize, randSize ) );
dfActor.SetParentOrigin( ParentOrigin::CENTER );
+ // Force the bubbles just in front of the solid background
+ dfActor.SetDepthIndex( DemoHelper::BACKGROUND_DEPTH_INDEX + 1 );
+
ShaderEffect effect = Toolkit::CreateDistanceFieldEffect();
dfActor.SetShaderEffect( effect );
dfActor.SetColor( randColour );
namespace DemoHelper
{
+enum ControlDepthIndexRanges
+{
+ BACKGROUND_DEPTH_INDEX = -10000000,
+ CONTENT_DEPTH_INDEX = 0,
+ DECORATION_DEPTH_INDEX = 10000000
+};
+
/**
* Provide a style for the view and its tool bar.
*/
{
Dali::Toolkit::TextLabel label = Dali::Toolkit::TextLabel::New();
label.SetAnchorPoint( Dali::AnchorPoint::TOP_LEFT );
- label.SetDrawMode( Dali::DrawMode::OVERLAY );
label.SetProperty( Dali::Toolkit::Control::Property::STYLE_NAME, "toolbarlabel" );
label.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT, title );
label.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
{
Dali::Toolkit::TextLabel label = Dali::Toolkit::TextLabel::New( text );
label.SetProperty( Dali::Toolkit::Control::Property::STYLE_NAME, "toolbarlabel" );
- label.SetDrawMode( Dali::DrawMode::OVERLAY );
label.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
label.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
label.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::HEIGHT );