f1105807fb
* clutter/clutter-script-private.h: * clutter/clutter-script.h: * clutter/clutter-script.c: Allow id-less objects: as long as they have a "type" member, a unique id will be provided. (json_object_end): Add merge id to the object information structure. (apply_behaviours), (add_children): Keep the unresolved objects around. (construct_stage), (clutter_script_construct_object): If an object has unresolved children or behaviours try resolving them when we ask for it. (json_parse_end), (clutter_script_ensure_objects): Ensure that the objects are fully constructed as best as we can when finished parsing. (object_info_free), (remove_by_merge_id): (clutter_script_unmerge_objects): Remove objects under the same merge id returned by the loading functions. (Fixes bug #558)
44 lines
944 B
JSON
44 lines
944 B
JSON
{
|
|
"My Scene" : {
|
|
"id" : "main-stage",
|
|
"type" : "ClutterStage",
|
|
"color" : "white",
|
|
"width" : 500,
|
|
"height" : 200,
|
|
"children" : [
|
|
{
|
|
"id" : "red-button",
|
|
"type" : "ClutterRectangle",
|
|
"color" : "#ff0000ff",
|
|
"x" : 50,
|
|
"y" : 50,
|
|
"width" : 100,
|
|
"height" : 100,
|
|
"visible" : true,
|
|
},
|
|
{
|
|
"id" : "green-button",
|
|
"type" : "ClutterRectangle",
|
|
"color" : "#00ff00ff",
|
|
"x" : 200,
|
|
"y" : 50,
|
|
"width" : 100,
|
|
"height" : 100,
|
|
"visible" : true,
|
|
"behaviours" : [ "fade-behaviour" ]
|
|
},
|
|
{
|
|
"id" : "red-hand",
|
|
"type" : "ClutterTexture",
|
|
"pixbuf" : "redhand.png",
|
|
"x" : 50,
|
|
"y" : 50,
|
|
"opacity" : 100,
|
|
"visible" : true,
|
|
"behaviours" : [ "rotate-behaviour", "fade-behaviour" ]
|
|
},
|
|
"blue-button"
|
|
]
|
|
}
|
|
}
|