Changes after 40127, changing control background to 0.f 74/40274/2
authorKimmo Hoikka <kimmo.hoikka@samsung.com>
Mon, 1 Jun 2015 16:31:39 +0000 (17:31 +0100)
committerKimmo Hoikka <kimmo.hoikka@samsung.com>
Tue, 2 Jun 2015 14:16:33 +0000 (15:16 +0100)
Change-Id: I05897aa4d0df28cab2e19557c80550420972a9b5

examples/animated-shapes/animated-shapes-example.cpp
examples/path-animation/path-animation.cpp
resources/scripts/animated-colors.json
resources/scripts/background-color.json
resources/scripts/table-view.json

index b9c3755..11de583 100644 (file)
@@ -55,11 +55,12 @@ public:
     // 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
index f1b1dd3..8eaf0fc 100644 (file)
@@ -140,8 +140,6 @@ public:
    */
   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");
@@ -150,12 +148,12 @@ public:
     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
@@ -192,12 +190,12 @@ public:
     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
@@ -456,6 +454,7 @@ public:
                                             BACKGROUND_IMAGE,
                                             TOOLBAR_IMAGE,
                                             "" );
+    mContentLayer.SetDrawMode( DrawMode::OVERLAY );
 
     mContentLayer.TouchedSignal().Connect(this, &PathController::OnTouchLayer);
 
@@ -475,7 +474,7 @@ public:
     mActor = ImageActor::New( img );
     mActor.SetAnchorPoint( AnchorPoint::CENTER );
     mActor.SetSize( 100, 50, 1 );
-    stage.Add( mActor );
+    mContentLayer.Add( mActor );
 
     CreateAnimation();
     CreateControls();
index a7e268c..e60b7ab 100644 (file)
   "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": {
index 4d6051b..562b88e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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]
     },
 
index 0a9fdca..14b90c3 100644 (file)
@@ -21,6 +21,7 @@
       "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