Group of UI Components
When a group is rotated or scaled, its children are drawn normally, and the batch is correctly rotated or scaled after the change.
Before the Group is drawn, the batch flush enables you to set the transformation. When there are many groups, this may become a performance bottleneck. If a group of actors do not rotate or scale, settransform (false) can be used for group. In this way, each child's location is drawn based on the group location so that the child appears in the correct location even if no conversion.
GroupInherited from actor. It is a node drawn in 2D scenarios and contains many other actors;
Each actor has a z-order that is equal to the order in which they are inserted into the group. The inserted result is displayed on the top of the inserted result.
Touch events are preferentially distributed to actors at the top layer.
Common Methods:
VoidAddactor(ActorActor)
Add an actor to a group as a sub-element.
VoidAddactorat(INT index,ActorActor)
Add an actor to a group as a sub-element.
Fixed on a level. If the index exceeds the size of the sub-array, the actor is inserted to the top layer.
Settransform (Boolean tansform)
The default value is true, indicating that the Group neutron element has rotation and scaling operations.
Before the Group is drawn, applytransform will be performed first, and then the resettransform will be flush () of batch for two operations. There will be performance bottleneck problems. If the sub-element has no rotation or scaling operation, you can set settransform (false ).
Classes inherited from the group include widgetgroup.
Libgdx Study Notes: Group of scene2d