// fitting it inside a quarter of the stage area with the conservative BOX
// filter mode:
Image bg = ResourceImage::New( CLUSTER_BACKGROUND_IMAGE_PATH, Dali::ImageDimensions( stageSize.x * 0.5f, stageSize.y * 0.5f ), Dali::FittingMode::SHRINK_TO_FIT, Dali::SamplingMode::BOX );
- ImageActor image = ImageActor::New(bg);
- clusterActor.SetBackgroundImage(image);
+ Control clusterControl = Control::DownCast( clusterActor );
+ clusterControl.SetBackgroundImage( bg );
// Add actors (pictures) as the children of the cluster
for (unsigned int i = 0; (i < style.GetMaximumNumberOfChildren()) && (*paths); i++, paths++)
}
}
-void Cluster::SetBackgroundImage( Actor image )
-{
- // Replaces the background image.
- if(mBackgroundImage && mBackgroundImage.GetParent())
- {
- mBackgroundImage.GetParent().Remove(mBackgroundImage);
- }
-
- mBackgroundImage = image;
- Self().Add(mBackgroundImage);
-
- mBackgroundImage.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- mBackgroundImage.SetParentOrigin( ParentOrigin::TOP_LEFT );
-
- UpdateBackground(0.0f);
-}
-
void Cluster::SetTitle( Actor text )
{
// Replaces the title actor.
void RestoreChild( unsigned int index, AlphaFunction alpha, const TimePeriod& period, bool front );
/**
- * @copydoc Demo::Cluster::SetBackgroundImage
- */
- void SetBackgroundImage( Actor image );
-
- /**
* @copydoc Demo::Cluster::SetTitle
*/
void SetTitle( Actor text );
GetImpl(*this).RestoreChild( index, alpha, period, front );
}
-void Cluster::SetBackgroundImage( Actor image )
-{
- GetImpl(*this).SetBackgroundImage(image);
-}
-
void Cluster::SetTitle( Actor text )
{
GetImpl(*this).SetTitle(text);
void RestoreChild( unsigned int index, AlphaFunction alpha, const TimePeriod& period, bool front = false );
/**
- * Sets the background image.
- * @param[in] image The background image.
- */
- void SetBackgroundImage( Actor image );
-
- /**
* Sets the title.
*
* @param[in] text Title text.
"type":"TableView",
"background-color": [0.5,0.5,0,1],
"parent-origin": "CENTER",
- "draw-mode": "OVERLAY_2D",
"size":[400,400,1],
"rows": 4,
"columns": 4,