Reputation: 699
I am making a game in Libgdx and I have a little problem. I have a number of actors that show up on the screen dynamically. If there is an Image actor that shows up after the first, could I send it to the back so that it doesn't cover the first one that is already on the screen?
Usually Libgdx adds each new actor higher in hierarchy like a stack and brings every one to the front.
Upvotes: 4
Views: 2584
Reputation: 4397
Try the following methods in the Actor class: toFront(), toBack() & setZIndex()
Upvotes: 10