Commit 71f9184d56211deeadbd7c0ec499dba4f99e57b8

Authored by Kimmo Hoikka
1 parent ba003ef3

Remove dali-any from Property::Value

- reimplement multivalue using more efficient union inside value
- remove unnecessary asserts when types dont match
- cleanup and sanitize scripting
- remove unnecessary templates from GetEnum, added error handling

Change-Id: If87d7eb6b5a0e3ff32f298cccc670b3f34dd091a
examples/cluster/cluster-impl.cpp
... ... @@ -540,15 +540,15 @@ void Cluster::DoTransformAction(const Property::Map& attributes)
540 540  
541 541 if( Property::VECTOR3 == type && "position" == stringValue.first )
542 542 {
543   - stringValue.second.Get(position);
  543 + stringValue.second.Get( position );
544 544 }
545 545 else if( Property::VECTOR3 == type && "scale" == stringValue.first )
546 546 {
547   - stringValue.second.Get(scale);
  547 + stringValue.second.Get( scale );
548 548 }
549 549 else if( "rotation" == stringValue.first )
550 550 {
551   - (void)Scripting::SetRotation(stringValue.second, rotation);
  551 + stringValue.second.Get( rotation );
552 552 }
553 553 }
554 554  
... ...
resources/scripts/background-color.json
... ... @@ -47,9 +47,7 @@
47 47 "anchor-point": "TOP_CENTER",
48 48 "size": [400, 150, 1],
49 49 "background-image": {
50   - "image": {
51   - "filename": "{DALI_IMAGE_DIR}button-background.png"
52   - }
  50 + "filename": "{DALI_IMAGE_DIR}button-background.png"
53 51 }
54 52 },
55 53  
... ... @@ -62,9 +60,7 @@
62 60 "size": [400, 150, 1],
63 61 "background-color": [0, 0, 1, 1],
64 62 "background-image": {
65   - "image": {
66   - "filename": "{DALI_IMAGE_DIR}button-background.png"
67   - }
  63 + "filename": "{DALI_IMAGE_DIR}button-background.png"
68 64 }
69 65 }
70 66 ]
... ...