[dali_1.0.52] Merge branch 'devel/master'
[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       "parent-origin": "TOP_CENTER",
26       "anchor-point": "TOP_CENTER",
27       "position": [0, 0, 0],
28       "size": [400, 200, 0],
29       "unselected-state-image": "{DALI_IMAGE_DIR}blocks-brick-1.png",
30       "selected-state-image": "{DALI_IMAGE_DIR}blocks-brick-2.png",
31       "label-text": "Normal"
32     },
33
34     // Second Button
35     {
36       "type": "PushButton",
37       "parent-origin": "CENTER",
38       "anchor-point": "CENTER",
39       "position": [0, 0, 0],
40       "size": [400, 200, 0],
41       "disabled": true,
42       "unselected-state-image": "{DALI_IMAGE_DIR}blocks-brick-1.png",
43       "selected-state-image": "{DALI_IMAGE_DIR}blocks-brick-2.png",
44       "disabled-state-image": "{DALI_IMAGE_DIR}blocks-brick-3.png",
45       "label-text": "Disabled"
46     },
47
48     // Third Button
49     {
50       "type": "PushButton",
51       "name": "toggle-button",
52       "parent-origin": "BOTTOM_CENTER",
53       "anchor-point": "BOTTOM_CENTER",
54       "position": [0, 0, 0],
55       "size": [400, 200, 0],
56       "togglable": true,
57       "unselected-state-image": "{DALI_IMAGE_DIR}blocks-brick-1.png",
58       "selected-state-image": "{DALI_IMAGE_DIR}blocks-brick-3.png",
59       "label-text": "Toggle",
60       "signals": [{
61         "name": "selected",
62         "action": "set",
63         "actor": "toggle-button",
64         "property": "label-actor",
65         "value": {
66           "type": "TextLabel",
67           "text": "Using a 9-patch image"
68         }
69       }]
70     }
71   ]
72 }