From 8d38197a421af87bbe3f598fc248c7fa2a55d72d Mon Sep 17 00:00:00 2001
From: Paul Wisbey
Date: Thu, 2 Apr 2015 16:55:22 +0100
Subject: [PATCH] Updating the builder examples to use TextLabel
Change-Id: I922f38428990ae202109a65bd711629817574d30
---
examples/builder/examples.cpp | 2 +-
resources/scripts/animated-colors.json | 6 ++--
resources/scripts/animation.json | 6 ++--
resources/scripts/background-color.json | 4 +--
resources/scripts/button.json | 8 +++---
resources/scripts/formatted-text.json | 51 ---------------------------------
resources/scripts/hello-world.json | 2 +-
resources/scripts/music-library.json | 6 ++--
resources/scripts/navigation.json | 8 +++---
resources/scripts/super-blur-view.json | 2 +-
10 files changed, 22 insertions(+), 73 deletions(-)
delete mode 100644 resources/scripts/formatted-text.json
diff --git a/examples/builder/examples.cpp b/examples/builder/examples.cpp
index cd3940b..e00c114 100644
--- a/examples/builder/examples.cpp
+++ b/examples/builder/examples.cpp
@@ -59,7 +59,7 @@ std::string JSON_BROKEN(" \
'stage': \
[ \
{ \
- 'type':'TextView', \
+ 'type':'TextLabel', \
'size': [50,50,1], \
'parent-origin': 'CENTER', \
'text':'COULD NOT LOAD JSON FILE' \
diff --git a/resources/scripts/animated-colors.json b/resources/scripts/animated-colors.json
index 2b930e8..a7e268c 100644
--- a/resources/scripts/animated-colors.json
+++ b/resources/scripts/animated-colors.json
@@ -988,12 +988,12 @@
]
},
{
- "type": "TextView",
+ "type": "TextLabel",
"name": "text",
"parent-origin": "CENTER",
"anchor-point": "CENTER",
- "text": "START",
- "markup-enabled": true,
+ "text": "START",
+ "point-size": 20,
"signals": [
{
"name": "tapped",
diff --git a/resources/scripts/animation.json b/resources/scripts/animation.json
index 7a5f8aa..0383037 100644
--- a/resources/scripts/animation.json
+++ b/resources/scripts/animation.json
@@ -85,7 +85,7 @@
// a tree of actors
"stage": [{
"name": "greeting",
- "type": "TextView",
+ "type": "TextLabel",
"text": "Touch me",
"styles": ["basic-text"],
"position": [0, -120, 0],
@@ -98,7 +98,7 @@
}]
}, {
"name":"greeting2",
- "type": "TextView",
+ "type": "TextLabel",
"parent-origin": "CENTER",
"anchor-point": "CENTER",
"size": [200, 200, 1],
@@ -111,7 +111,7 @@
"animation": "path-animation"
}]
}, {
- "type": "TextView", // styles can be additive
+ "type": "TextLabel", // styles can be additive
"parent-origin": "CENTER",
"anchor-point": "CENTER",
"size": [200, 200, 1],
diff --git a/resources/scripts/background-color.json b/resources/scripts/background-color.json
index dcf8103..4d6051b 100644
--- a/resources/scripts/background-color.json
+++ b/resources/scripts/background-color.json
@@ -16,9 +16,9 @@
*/
{
"stage": [
- // A TextView with a red background
+ // A TextLabel with a red background
{
- "type": "TextView",
+ "type": "TextLabel",
"text": "Hello World",
"parent-origin": "TOP_CENTER",
"anchor-point": "TOP_CENTER",
diff --git a/resources/scripts/button.json b/resources/scripts/button.json
index 392f97d..00c94e0 100644
--- a/resources/scripts/button.json
+++ b/resources/scripts/button.json
@@ -39,7 +39,7 @@
}
},
"label-actor": {
- "type": "TextView",
+ "type": "TextLabel",
"text": "Normal"
}
},
@@ -52,7 +52,7 @@
"position": [0, 0, 0],
"size": [0, 200, 0],
"label-actor": {
- "type": "TextView",
+ "type": "TextLabel",
"text": "Disabled"
},
"disabled": true,
@@ -85,7 +85,7 @@
"position": [0, 0, 0],
"size": [0, 200, 0],
"label-actor": {
- "type": "TextView",
+ "type": "TextLabel",
"text": "Toggle"
},
"togglable": true,
@@ -111,7 +111,7 @@
"actor": "toggle-button",
"property": "label-actor",
"value": {
- "type": "TextView",
+ "type": "TextLabel",
"text": "Using a 9-patch image"
}
}]
diff --git a/resources/scripts/formatted-text.json b/resources/scripts/formatted-text.json
deleted file mode 100644
index 82dac7c..0000000
--- a/resources/scripts/formatted-text.json
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-{
- // a tree of actors
- "stage": [{
- "type": "Actor",
- "size": [400, 400, 1],
- "parent-origin": "CENTER",
- "actors": [{
- "type": "TextView",
- "size": [400, 400, 1],
- "text": "",
- "markup-enabled": true,
- "multiline-policy": "SplitByNewLineChar",
- "horizontal-alignment": "HorizontalCenter",
- "vertical-alignment": "VerticalBottom",
- "width-exceed-policy": "Fade",
- "line-justification": "Center",
- "fade-boundary": [50, 50, 0, 0],
- "line-height-offset": 25.0,
- "parent-origin": "TOP_CENTER"
- }, {
- "type": "TextView",
- "size": [400, 400, 1],
- "text": "Text with\n'markup-enabled':false",
- "markup-enabled": false,
- "multiline-policy": "SplitByWord",
- "horizontal-alignment": "HorizontalLeft",
- "vertical-alignment": "VerticalTop",
- "width-exceed-policy": "ShrinkToFit",
- "height-exceed-policy": "Original",
- "line-justification": "Right",
- "line-height-offset": 5.0,
- "parent-origin": "BOTTOM_CENTER"
- }]
- }]
-}
diff --git a/resources/scripts/hello-world.json b/resources/scripts/hello-world.json
index abbeb5e..f92b710 100644
--- a/resources/scripts/hello-world.json
+++ b/resources/scripts/hello-world.json
@@ -17,7 +17,7 @@
{
// a tree of actors
"stage": [{
- "type": "TextView",
+ "type": "TextLabel",
"text": "Hello World",
"parent-origin": "CENTER"
}]
diff --git a/resources/scripts/music-library.json b/resources/scripts/music-library.json
index f0a8e4f..163412b 100644
--- a/resources/scripts/music-library.json
+++ b/resources/scripts/music-library.json
@@ -132,7 +132,7 @@
"type": "Control",
"actors": [
{
- "type": "TextView",
+ "type": "TextLabel",
"actors": [],
"name": "Time",
"position": [
@@ -147,8 +147,8 @@
1
],
"sizeAspectRatio": false,
- "markup-enabled": true,
- "text": "12:30"
+ "text": "12:30",
+ "point-size": 10
}
],
"name": "Indicators",
diff --git a/resources/scripts/navigation.json b/resources/scripts/navigation.json
index f54a71b..d09feac 100644
--- a/resources/scripts/navigation.json
+++ b/resources/scripts/navigation.json
@@ -31,7 +31,7 @@
"title": "title",
"sub-title": "sub title",
"actors": [{
- "type": "TextView", // styles can be additive
+ "type": "TextLabel", // styles can be additive
"parent-origin": [0.5, 0.5, 0],
"anchor-point": [0.5, 0.5, 0],
"size": [200, 200, 1],
@@ -47,13 +47,13 @@
"type": "Page",
"name": "page2",
"actors": [{
- "type": "TextView", // styles can be additive
+ "type": "TextLabel", // styles can be additive
"parent-origin": [0.5, 0.5, 0.5],
"anchor-point": [0.5, 0.5, 0.5],
"size": [200, 200, 1],
"text": "Hello World!"
}, {
- "type": "TextView", // styles can be additive
+ "type": "TextLabel", // styles can be additive
"parent-origin": [0.0, 0.0, 0.5],
"anchor-point": [0.0, 0.0, 0.5],
"size": [200, 200, 1],
@@ -64,7 +64,7 @@
"action": "pop"
}]
}, {
- "type": "TextView", // styles can be additive
+ "type": "TextLabel", // styles can be additive
"parent-origin": [1.0, 1.0, 0.5],
"anchor-point": [1.0, 1.0, 0.5],
"size": [200, 200, 1],
diff --git a/resources/scripts/super-blur-view.json b/resources/scripts/super-blur-view.json
index dd31564..59ca48a 100644
--- a/resources/scripts/super-blur-view.json
+++ b/resources/scripts/super-blur-view.json
@@ -67,7 +67,7 @@
"position": [0, 0, 0],
"size": [0, 100, 0],
"label-actor": {
- "type": "TextView",
+ "type": "TextLabel",
"text": "Blur"
},
"normal-state-actor": {
--
2.7.4