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 b9c37559bb6797feafedd5d2f82b2bd0d19e95b3..11de583783afc8bf093eb42cb1c915d780e7bbf2 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 f1b1dd32fa0fc3074a661dae25a8a8eb28c68826..8eaf0fcdae3b6429e60e74391100882bd1db502d 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 a7e268c5c689c3bdbaa6221272a8efb5cd02d416..e60b7abd4cb051bd80308f7e313eb27f8c9bae22 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 4d6051bf9cb45bc2902caa42da0670ab11df3da1..562b88e91c560111ece7c2fe01d3ad696a39884f 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 0a9fdca2748a93408043a3008fc534cc2b94ccc2..14b90c3be2c8f5a4e311d328ba207f5c10cf9614 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