Example usage for com.badlogic.gdx.scenes.scene2d Stage clear

List of usage examples for com.badlogic.gdx.scenes.scene2d Stage clear

Introduction

In this page you can find the example usage for com.badlogic.gdx.scenes.scene2d Stage clear.

Prototype

public void clear() 

Source Link

Document

Removes the root's children, actions, and listeners.

Usage

From source file:de.bitbrain.craft.ui.Overlay.java

License:Open Source License

public void show(Actor... actors) {
    if (renderer != null) {
        Stage stage = renderer.getOverlay();
        stage.clear();
        for (Actor actor : actors) {
            stage.addActor(actor);/*from ww  w  .ja  va2  s  . c  om*/
        }
        renderer.setMode(UIMode.OVERLAY);
    }
}

From source file:se.theodor.quiz.screen.CreateQuiz.java

License:Apache License

@Override
public void show() {
    camera = Objects.CAMERA;/*from  w w w.  j  a  va  2 s  .c o m*/
    editorPanel = new EditorPanel((int) quiz.getWidth(), 300, quizField, loadQuizPanel,
            TEXTURE_ATLAS.createPatch("fallDownWindow"), quiz);
    quizField = new QuizField(quiz, camera, editorPanel, 9, 5);
    loadQuizPanel = new LoadQuizPanel(new Rectangle(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()),
            this);

    // TODO: FIX STAGE
    Stage stage = Objects.STAGE;
    stage.clear();
    Array<Actor> actors = getMainActors();
    for (Actor a : actors) {
        Objects.STAGE.addActor(a);
    }
    initListener();
}