Added clock script to check animation time
[platform/core/uifw/dali-demo.git] / resources / scripts / button.json
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 {
18   "constants": {
19     "CONFIG_SCRIPT_LOG_LEVEL": "Verbose"
20   },
21   "stage": [
22     // First Button
23     {
24       "type": "PushButton",
25       "parentOrigin": "TOP_CENTER",
26       "anchorPoint": "TOP_CENTER",
27       "position": [0, 0, 0],
28       "size": [400, 200, 0],
29       "unselectedStateImage": "{DALI_IMAGE_DIR}blocks-brick-1.png",
30       "selectedStateImage": "{DALI_IMAGE_DIR}blocks-brick-2.png",
31       "labelText": "Normal"
32     },
33
34     // Second Button
35     {
36       "type": "PushButton",
37       "parentOrigin": "CENTER",
38       "anchorPoint": "CENTER",
39       "position": [0, 0, 0],
40       "size": [400, 200, 0],
41       "disabled": true,
42       "unselectedStateImage": "{DALI_IMAGE_DIR}blocks-brick-1.png",
43       "selectedStateImage": "{DALI_IMAGE_DIR}blocks-brick-2.png",
44       "disabledStateImage": "{DALI_IMAGE_DIR}blocks-brick-3.png",
45       "labelText": "Disabled"
46     },
47
48     // Third Button
49     {
50       "type": "PushButton",
51       "name": "toggleButton",
52       "parentOrigin": "BOTTOM_CENTER",
53       "anchorPoint": "BOTTOM_CENTER",
54       "position": [0, 0, 0],
55       "size": [400, 200, 0],
56       "togglable": true,
57       "unselectedStateImage": "{DALI_IMAGE_DIR}blocks-brick-1.png",
58       "selectedStateImage": "{DALI_IMAGE_DIR}blocks-brick-3.png",
59       "labelText": "Toggle",
60       "signals": [{
61         "name": "selected",
62         "action": "set",
63         "actor": "toggleButton",
64         "property": "labelActor",
65         "value": {
66           "type": "TextLabel",
67           "text": "Using a 9-patch image"
68         }
69       }]
70     }
71   ]
72 }