Search in sources :

Example 1 with RemoveActorAction

use of com.badlogic.gdx.scenes.scene2d.actions.RemoveActorAction in project skin-composer by raeleus.

the class MenuList method hide.

public void hide() {
    // fade out and then remove
    clearActions();
    AlphaAction alphaAction = new AlphaAction();
    alphaAction.setAlpha(0.0f);
    alphaAction.setDuration(.3f);
    alphaAction.setInterpolation(Interpolation.fade);
    RemoveActorAction removeAction = new RemoveActorAction();
    removeAction.setActor(this);
    SequenceAction sequenceAction = new SequenceAction(alphaAction, removeAction);
    addAction(sequenceAction);
}
Also used : RemoveActorAction(com.badlogic.gdx.scenes.scene2d.actions.RemoveActorAction) AlphaAction(com.badlogic.gdx.scenes.scene2d.actions.AlphaAction) SequenceAction(com.badlogic.gdx.scenes.scene2d.actions.SequenceAction)

Aggregations

AlphaAction (com.badlogic.gdx.scenes.scene2d.actions.AlphaAction)1 RemoveActorAction (com.badlogic.gdx.scenes.scene2d.actions.RemoveActorAction)1 SequenceAction (com.badlogic.gdx.scenes.scene2d.actions.SequenceAction)1