1
0
Fork 0

Use Canvas and CanvasGroup ghosts provided by fgfs core

This commit is contained in:
Thomas Geymayer 2012-11-16 12:35:49 +01:00
parent fa97e5ea7a
commit bc63ff3ea8

View file

@ -736,7 +736,17 @@ var Canvas = {
# @param id Optional id/name for the group
createGroup: func(id = nil)
{
return Group.new([me.texture, "group"], id);
if( size(me.parents) >= 2 )
{
var ghost = me.parents[1].createGroup();
return {
parents: [ Group.new(props.wrapNode(ghost._node_ghost), id),
ghost ]
};
}
else
# Fallback for Canvas instances not based on a ghost
return Group.new([me.texture, "group"], id);
},
# Set the background color
#