const std::string BUTTON_OK( "Ok" );
const std::string BUTTON_CANCEL( "Cancel" );
-const std::string DEFAULT_BACKGROUND_IMAGE_PATH( DALI_IMAGE_DIR "background-gradient.jpg" );
-const std::string LOGO_PATH( DALI_IMAGE_DIR "dali-logo.png" );
+const std::string LOGO_PATH( DALI_IMAGE_DIR "Logo-for-demo.png" );
const std::string DEFAULT_TOOLBAR_IMAGE_PATH( DALI_IMAGE_DIR "top-bar.png" );
const std::string BUTTON_BACKGROUND(DALI_IMAGE_DIR "button-background.png");
const std::string TILE_BACKGROUND(DALI_IMAGE_DIR "item-background.png");
/**
* Creates the background image
*/
-ImageView CreateBackground( std::string imagePath )
+Control CreateBackground( std::string stylename )
{
- Image image = ResourceImage::New( imagePath );
- ImageView background = ImageView::New( image );
+ Control background = Control::New();
+ Stage::GetCurrent().Add( background );
+ background.SetProperty( Control::Property::STYLE_NAME,stylename);
background.SetName( "BACKGROUND" );
background.SetAnchorPoint( AnchorPoint::CENTER );
background.SetParentOrigin( ParentOrigin::CENTER );
- background.SetZ( -1.0f );
background.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
return background;
mBackgroundAnimations(),
mExampleList(),
mExampleMap(),
- mBackgroundImagePath( DEFAULT_BACKGROUND_IMAGE_PATH ),
mTotalPages(),
mScrolling( false ),
mSortAlphabetically( false ),
mExampleMap[ example.name ] = example;
}
-void DaliTableView::SetBackgroundPath( std::string imagePath )
-{
- mBackgroundImagePath = imagePath;
-}
-
void DaliTableView::SortAlphabetically( bool sortAlphabetically )
{
mSortAlphabetically = sortAlphabetically;
const Vector2 stageSize = Stage::GetCurrent().GetSize();
// Background
- ImageView background = CreateBackground( mBackgroundImagePath );
+ Control background = CreateBackground( "launcherbackground" );
Stage::GetCurrent().Add( background );
- // Render entire content as overlays, as is all on same 2D plane.
+ // Add root actor
mRootActor = TableView::New( 4, 1 );
mRootActor.SetAnchorPoint( AnchorPoint::CENTER );
mRootActor.SetParentOrigin( ParentOrigin::CENTER );
*/
void AddExample(Example example);
- /**
- * Sets the background image PATH.
- *
- * @param[in] imagePath The file path to the image to use as the background.
- *
- * @note Should be called before the Application MainLoop is started.
- */
- void SetBackgroundPath( std::string imagePath );
-
/**
* Sorts the example list alphabetically by Title if parameter is true.
*
ExampleList mExampleList; ///< List of examples.
ExampleMap mExampleMap; ///< Map LUT for examples.
- std::string mBackgroundImagePath; ///< The path to the background image.
int mTotalPages; ///< Total pages within scrollview.
bool mScrolling:1; ///< Flag indicating whether view is currently being scrolled
Stage::GetCurrent().Add(overlay);
mMagnifier = Toolkit::Magnifier::New();
- mMagnifier.SetSourceActor( mView.GetChildAt( 0 ) );
+ mMagnifier.SetSourceActor( mView );
mMagnifier.SetSize( MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width
mMagnifier.SetProperty( Toolkit::Magnifier::Property::MAGNIFICATION_FACTOR, MAGNIFICATION_FACTOR );
mMagnifier.SetScale(Vector3::ZERO);
// Create bouncing magnifier automatically bounces around screen.
mBouncingMagnifier = Toolkit::Magnifier::New();
- mBouncingMagnifier.SetSourceActor( mView.GetChildAt( 0 ) );
+ mBouncingMagnifier.SetSourceActor( mView );
mBouncingMagnifier.SetSize( MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width
mBouncingMagnifier.SetProperty( Toolkit::Magnifier::Property::MAGNIFICATION_FACTOR, MAGNIFICATION_FACTOR );
overlay.Add( mBouncingMagnifier );
"buttonlabel":
{
"point-size":11
+ },
+
+ "launcherbackground":
+ {
+ "background":
+ {
+ "renderer-type": "gradient-renderer",
+ "gradient-center": [240, 400],
+ "gradient-radius": 932,
+ "gradient-units": "user-space",
+ "gradient-stop-color": [[0.247,0.38,0.52,1.0],[0.055,0.18,0.286,1.0]],
+ "gradient-stop-offset":[0.0,1.0]
+ }
}
}
}
{
"point-size":10
},
-
+
"scrollview":
{
"overshoot-effect-color":"B018"
"buttonlabel":
{
"point-size":8
+ },
+
+ "launcherbackground":
+ {
+ "background":
+ {
+ "renderer-type": "gradient-renderer",
+ "gradient-center": [360, 640],
+ "gradient-radius": 1468,
+ "gradient-units": "user-space",
+ "gradient-stop-color": [[0.247,0.38,0.52,1.0],[0.055,0.18,0.286,1.0]],
+ "gradient-stop-offset":[0.0,1.0]
+ }
}
}
}