summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordongsug.song <dongsug.song@samsung.com>2016-11-15 14:28:14 +0900
committerdongsug.song <dongsug.song@samsung.com>2016-11-15 14:28:18 +0900
commitf47c608875e38904bdc6af9507e4656de2e7cb85 (patch)
tree079395ece0c0c5559bda6a32acc534a47391a0e3
parent66e1e47abe559c223631fc35515365a983a5935b (diff)
downloaddali-demo-f47c608875e38904bdc6af9507e4656de2e7cb85.tar.gz
dali-demo-f47c608875e38904bdc6af9507e4656de2e7cb85.tar.bz2
dali-demo-f47c608875e38904bdc6af9507e4656de2e7cb85.zip
Revert "[3.0] Stencil Renderer demo: Toolbar removed"
This reverts commit d4990959450c2c6e01e857a83f2645805995e3f8. Change-Id: I9db20e53fbf50ef8a4d35fcbd25787b68f19d804
-rw-r--r--examples/renderer-stencil/renderer-stencil-example.cpp27
1 files changed, 6 insertions, 21 deletions
diff --git a/examples/renderer-stencil/renderer-stencil-example.cpp b/examples/renderer-stencil/renderer-stencil-example.cpp
index 5a92cd67..994f5518 100644
--- a/examples/renderer-stencil/renderer-stencil-example.cpp
+++ b/examples/renderer-stencil/renderer-stencil-example.cpp
@@ -33,6 +33,7 @@ namespace
// Application constants:
const char * const APPLICATION_TITLE( "Renderer Stencil API Demo" );
+const char * const TOOLBAR_IMAGE( DEMO_IMAGE_DIR "top-bar.png" );
const char * const BACKGROUND_IMAGE( DEMO_IMAGE_DIR "background-gradient.jpg" );
// Texture filenames:
@@ -51,7 +52,6 @@ const float ANIMATION_BOUNCE_DEFORMATION_PERCENT( 20.0f ); ///< Percentage (of t
const float ANIMATION_BOUNCE_HEIGHT_PERCENT( 40.0f ); ///< Percentage (of the cube's size) to bounce up in to the air by.
// Base colors for the objects:
-const Vector4 TEXT_COLOR( 1.0f, 1.0f, 1.0f, 1.0f ); ///< White.
const Vector4 CUBE_COLOR( 1.0f, 1.0f, 1.0f, 1.0f ); ///< White.
const Vector4 FLOOR_COLOR( 1.0f, 1.0f, 1.0f, 1.0f ); ///< White.
const Vector4 REFLECTION_COLOR( 0.6f, 0.6f, 0.6f, 0.6f ); ///< Note that alpha is not 1.0f, to make the blend more photo-realistic.
@@ -116,26 +116,11 @@ private:
{
Stage stage = Stage::GetCurrent();
- // Creates the background image.
- Toolkit::Control background = Dali::Toolkit::Control::New();
- background.SetAnchorPoint( Dali::AnchorPoint::CENTER );
- background.SetParentOrigin( Dali::ParentOrigin::CENTER );
- background.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::ALL_DIMENSIONS );
- Dali::Property::Map map;
- map["rendererType"] = "IMAGE";
- map["url"] = BACKGROUND_IMAGE;
- background.SetProperty( Dali::Toolkit::Control::Property::BACKGROUND, map );
- stage.Add( background );
-
- // Create a TextLabel for the application title.
- Toolkit::TextLabel label = Toolkit::TextLabel::New( APPLICATION_TITLE );
- label.SetAnchorPoint( AnchorPoint::TOP_CENTER );
- // Set the parent origin to a small percentage below the top (so the demo will scale for different resolutions).
- label.SetParentOrigin( Vector3( 0.5f, 0.03f, 0.5f ) );
- label.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
- label.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
- label.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, TEXT_COLOR );
- stage.Add( label );
+ // Creates a default view with a default tool-bar.
+ // The view is added to the stage.
+ Toolkit::ToolBar toolBar;
+ Layer toolBarLayer = DemoHelper::CreateView( application, mView, toolBar, BACKGROUND_IMAGE, TOOLBAR_IMAGE, APPLICATION_TITLE );
+ stage.Add( toolBarLayer );
// Layer to hold the 3D scene.
Layer layer = Layer::New();