Use Canvas and CanvasGroup ghosts provided by fgfs core
This commit is contained in:
parent
fa97e5ea7a
commit
bc63ff3ea8
1 changed files with 11 additions and 1 deletions
|
@ -736,7 +736,17 @@ var Canvas = {
|
||||||
# @param id Optional id/name for the group
|
# @param id Optional id/name for the group
|
||||||
createGroup: func(id = nil)
|
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
|
# Set the background color
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue