List of usage examples for com.badlogic.gdx.scenes.scene2d Group swapActor
public boolean swapActor(Actor first, Actor second)
From source file:com.uwsoft.editor.gdx.mediators.ItemControlMediator.java
License:Apache License
public void itemZIndexChange(HashMap<IBaseItem, SelectionRectangle> currentSelection, boolean isUp) { for (SelectionRectangle value : currentSelection.values()) { sceneControl.getCurrentScene().updateDataVO(); int ammount = 1; if (!isUp) ammount = -1;/*from w ww .j a va 2 s . c o m*/ int setting = value.getHostAsActor().getZIndex() + ammount; if (setting < 0) setting = 0; Group parent = value.getHostAsActor().getParent(); parent.swapActor(value.getHostAsActor().getZIndex(), setting); sceneControl.getCurrentScene().updateDataVO(); } }