// Get a handle to the stage
Stage stage = Stage::GetCurrent();
- //Create a view
+ // Create a view
mView = Dali::Toolkit::Control::New();
mView.SetAnchorPoint( Dali::AnchorPoint::CENTER );
mView.SetParentOrigin( Dali::ParentOrigin::CENTER );
mView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
+ mView.SetDrawMode( DrawMode::OVERLAY );
stage.Add( mView );
//Set background image for the view
*/
void DrawPath( unsigned int resolution )
{
- Stage stage = Dali::Stage::GetCurrent();
-
//Create path mesh actor
Dali::MeshData meshData = MeshFactory::NewPath( mPath, resolution );
Dali::Material material = Material::New("LineMaterial");
Dali::Mesh mesh = Dali::Mesh::New( meshData );
if( mMeshPath )
{
- stage.Remove( mMeshPath );
+ mContentLayer.Remove( mMeshPath );
}
mMeshPath = Dali::MeshActor::New( mesh );
mMeshPath.SetAnchorPoint( AnchorPoint::TOP_LEFT );
mMeshPath.SetParentOrigin( ParentOrigin::TOP_LEFT );
- stage.Add( mMeshPath );
+ mContentLayer.Add( mMeshPath );
////Create mesh connecting interpolation points and control points
mesh = Dali::Mesh::New( meshData );
if( mMeshHandlers )
{
- stage.Remove( mMeshHandlers );
+ mContentLayer.Remove( mMeshHandlers );
}
mMeshHandlers = Dali::MeshActor::New( mesh );
mMeshHandlers.SetAnchorPoint( AnchorPoint::TOP_LEFT );
mMeshHandlers.SetParentOrigin( ParentOrigin::TOP_LEFT );
- stage.Add( mMeshHandlers );
+ mContentLayer.Add( mMeshHandlers );
//Create actors representing interpolation points
BACKGROUND_IMAGE,
TOOLBAR_IMAGE,
"" );
+ mContentLayer.SetDrawMode( DrawMode::OVERLAY );
mContentLayer.TouchedSignal().Connect(this, &PathController::OnTouchLayer);
mActor = ImageActor::New( img );
mActor.SetAnchorPoint( AnchorPoint::CENTER );
mActor.SetSize( 100, 50, 1 );
- stage.Add( mActor );
+ mContentLayer.Add( mActor );
CreateAnimation();
CreateControls();
"stage": [
{
"type": "Control",
- "relayout-enabled": false,
+ "draw-mode": "OVERLAY",
"actors": [
{
"type": "Control",
- "relayout-enabled": true,
- "actors": [],
"name": "Control 8",
"position": [
0,
},
{
"type": "Control",
- "relayout-enabled": false,
"actors": [
{
"type": "Control",
- "relayout-enabled": false,
- "actors": [],
"name": "Container 2",
"position": [
0,
},
{
"type": "Control",
- "relayout-enabled": false,
"actors": [
{
"type": "Control",
- "relayout-enabled": false,
- "actors": [],
"name": "Container 4",
"position": [
0,
},
{
"type": "Control",
- "relayout-enabled": false,
"actors": [
{
"type": "Control",
- "relayout-enabled": false,
- "actors": [],
"name": "Container 5",
"position": [
0,
},
{
"type": "Control",
- "relayout-enabled": false,
"actors": [
{
"type": "Control",
- "relayout-enabled": false,
- "actors": [],
"name": "Container 7",
"position": [
0,
},
{
"type": "Control",
- "relayout-enabled": false,
"actors": [
{
"type": "Control",
- "relayout-enabled": false,
- "actors": [],
"name": "Container 8",
"position": [
0,
},
{
"type": "Control",
- "relayout-enabled": false,
"actors": [
{
"type": "Control",
- "relayout-enabled": false,
- "actors": [],
"name": "Container 10",
"position": [
0,
},
{
"type": "Control",
- "relayout-enabled": false,
"actors": [
{
"type": "Control",
- "relayout-enabled": false,
- "actors": [],
"name": "Control 4",
"position": [
0,
},
{
"type": "Control",
- "relayout-enabled": false,
"actors": [
{
"type": "Control",
- "relayout-enabled": false,
"actors": [
{
"type": "Control",
- "actors": [],
"name": "Container 13",
"position": [
0,
},
{
"type": "Control",
- "relayout-enabled": false,
- "actors": [],
"name": "Container 11",
"position": [
0,
},
{
"type": "Control",
- "relayout-enabled": false,
"actors": [
{
"type": "Control",
- "relayout-enabled": false,
"actors": [
{
"type": "Control",
- "relayout-enabled": false,
- "actors": [],
"name": "Container 15",
"position": [
0,
},
{
"type": "Control",
- "relayout-enabled": false,
- "actors": [],
"name": "Container 16",
"position": [
0,
0.3411764705882353,
1
]
+ },
+ {
+ "type": "TextLabel",
+ "name": "text",
+ "parent-origin": "CENTER",
+ "anchor-point": "CENTER",
+ "text": "START",
+ "point-size": 20,
+ "signals": [
+ {
+ "name": "tapped",
+ "action": "play",
+ "animation": "Animation_1"
+ },
+ {
+ "name": "tapped",
+ "action": "play",
+ "animation": "HideText"
}
+ ]
+ }
],
"name": "Container 1",
"position": [
0.32941176470588235,
1
]
- },
- {
- "type": "TextLabel",
- "name": "text",
- "parent-origin": "CENTER",
- "anchor-point": "CENTER",
- "text": "START",
- "point-size": 20,
- "signals": [
- {
- "name": "tapped",
- "action": "play",
- "animation": "Animation_1"
- },
- {
- "name": "tapped",
- "action": "play",
- "animation": "HideText"
- }
- ]
}
],
"animations": {
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// A TextLabel with a red background
{
"type": "TextLabel",
+ "draw-mode": "OVERLAY",
"text": "Hello World",
"parent-origin": "TOP_CENTER",
"anchor-point": "TOP_CENTER",
"background-color": [1, 0, 0, 1],
+ "position": [0, 50, 0],
+ "point-size": 40,
"size": [400, 150, 1]
},
"type":"TableView",
"background-color": [0.5,0.5,0,1],
"parent-origin": "CENTER",
+ "draw-mode": "OVERLAY",
"size":[400,500,1],
"cell-padding": [10, 5],
"layout-rows": { // set the height of the rows