DALi Version 1.3.38
[platform/core/uifw/dali-demo.git] / resources / scripts / button.json
index 9b3d46e..d6d4998 100644 (file)
  *
  */
 {
-  "constants": {
-    "CONFIG_SCRIPT_LOG_LEVEL": "Verbose"
-  },
   "stage": [
     // First Button
     {
       "type": "PushButton",
-      "parent-origin": "TOP_CENTER",
-      "anchor-point": "TOP_CENTER",
+      "parentOrigin": "TOP_CENTER",
+      "anchorPoint": "TOP_CENTER",
       "position": [0, 0, 0],
-      "size": [400, 200, 0],
-      "unselected-state-actor": "{DALI_IMAGE_DIR}blocks-brick-1.png",
-      "selected-state-actor": "{DALI_IMAGE_DIR}blocks-brick-2.png",
-      "label-actor": {
-        "type": "TextLabel",
-        "text": "Normal"
-      }
+      "widthResizePolicy":"FILL_TO_PARENT",
+      "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
+      "sizeModeFactor": [1,0.25,1],
+      "labelText": "Normal"
     },
 
     // Second Button
     {
       "type": "PushButton",
-      "parent-origin": "CENTER",
-      "anchor-point": "CENTER",
+      "parentOrigin": "CENTER",
+      "anchorPoint": "CENTER",
       "position": [0, 0, 0],
-      "size": [400, 200, 0],
-      "label-actor": {
-        "type": "TextLabel",
-        "text": "Disabled"
-      },
+      "widthResizePolicy":"FILL_TO_PARENT",
+      "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
+      "sizeModeFactor": [1,0.25,1],
       "disabled": true,
-      "unselected-state-actor": "{DALI_IMAGE_DIR}blocks-brick-1.png",
-      "selected-state-actor": "{DALI_IMAGE_DIR}blocks-brick-2.png",
-      "disabled-state-actor": "{DALI_IMAGE_DIR}blocks-brick-3.png"
+      "labelText": "Disabled"
     },
 
     // Third Button
     {
       "type": "PushButton",
-      "name": "toggle-button",
-      "parent-origin": "BOTTOM_CENTER",
-      "anchor-point": "BOTTOM_CENTER",
+      "name": "toggleButton",
+      "parentOrigin": "BOTTOM_CENTER",
+      "anchorPoint": "BOTTOM_CENTER",
       "position": [0, 0, 0],
-      "size": [400, 200, 0],
-      "label-actor": {
-        "type": "TextLabel",
-        "text": "Toggle"
-      },
+      "widthResizePolicy":"FILL_TO_PARENT",
+      "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
+      "sizeModeFactor": [1,0.25,1],
       "togglable": true,
-      "unselected-state-actor": "{DALI_IMAGE_DIR}blocks-brick-1.png",
-      "selected-state-actor": "{DALI_IMAGE_DIR}blocks-paddle.png",
-      "signals": [{
-        "name": "selected",
-        "action": "set",
-        "actor": "toggle-button",
-        "property": "label-actor",
-        "value": {
-          "type": "TextLabel",
-          "text": "Using a 9-patch image"
-        }
-      }]
+      "unselectedStateImage": "{DEMO_IMAGE_DIR}button-up-6.9.png",
+      "selectedStateImage": "{DEMO_IMAGE_DIR}button-up-8.9.png",
+      "labelText": "Toggle With Custom Images"
     }
   ]
 }