Search in sources :

Example 51 with Actor

use of com.badlogic.gdx.scenes.scene2d.Actor in project netthreads-libgdx by alistairrutherford.

the class Layer method enter.

@Override
public void enter() {
    SnapshotArray<Actor> list = getChildren();
    int size = list.size;
    for (int i = 0; i < size; i++) {
        Actor actor = list.get(i);
        if (actor instanceof Layer) {
            Layer layer = (Layer) actor;
            layer.enter();
        }
    }
}
Also used : Actor(com.badlogic.gdx.scenes.scene2d.Actor)

Example 52 with Actor

use of com.badlogic.gdx.scenes.scene2d.Actor in project netthreads-libgdx by alistairrutherford.

the class Layer method touchDragged.

@Override
public boolean touchDragged(int x, int y, int pointer) {
    boolean handled = false;
    SnapshotArray<Actor> list = getChildren();
    int size = list.size;
    int index = 0;
    while (index < size && !handled) {
        Actor actor = list.get(index);
        if (actor instanceof Layer) {
            Layer layer = (Layer) actor;
            handled = layer.touchDragged(x, y, pointer);
        }
        index++;
    }
    return handled;
}
Also used : Actor(com.badlogic.gdx.scenes.scene2d.Actor)

Example 53 with Actor

use of com.badlogic.gdx.scenes.scene2d.Actor in project netthreads-libgdx by alistairrutherford.

the class Layer method exit.

@Override
public void exit() {
    SnapshotArray<Actor> list = getChildren();
    int size = list.size;
    for (int i = 0; i < size; i++) {
        Actor actor = list.get(i);
        if (actor instanceof Layer) {
            Layer layer = (Layer) actor;
            layer.exit();
        }
    }
}
Also used : Actor(com.badlogic.gdx.scenes.scene2d.Actor)

Example 54 with Actor

use of com.badlogic.gdx.scenes.scene2d.Actor in project netthreads-libgdx by alistairrutherford.

the class Layer method touchDown.

@Override
public boolean touchDown(int x, int y, int pointer, int button) {
    boolean handled = false;
    SnapshotArray<Actor> list = getChildren();
    int size = list.size;
    int index = 0;
    while (index < size && !handled) {
        Actor actor = list.get(index);
        if (actor instanceof Layer) {
            Layer layer = (Layer) actor;
            handled = layer.touchDown(x, y, pointer, button);
        }
        index++;
    }
    return handled;
}
Also used : Actor(com.badlogic.gdx.scenes.scene2d.Actor)

Example 55 with Actor

use of com.badlogic.gdx.scenes.scene2d.Actor in project netthreads-libgdx by alistairrutherford.

the class Layer method touchUp.

@Override
public boolean touchUp(int x, int y, int pointer, int button) {
    boolean handled = false;
    SnapshotArray<Actor> list = getChildren();
    int size = list.size;
    int index = 0;
    while (index < size && !handled) {
        Actor actor = list.get(index);
        if (actor instanceof Layer) {
            Layer layer = (Layer) actor;
            handled = layer.touchUp(x, y, pointer, button);
        }
        index++;
    }
    return handled;
}
Also used : Actor(com.badlogic.gdx.scenes.scene2d.Actor)

Aggregations

Actor (com.badlogic.gdx.scenes.scene2d.Actor)67 ChangeListener (com.badlogic.gdx.scenes.scene2d.utils.ChangeListener)26 Stage (com.badlogic.gdx.scenes.scene2d.Stage)19 TextButton (com.badlogic.gdx.scenes.scene2d.ui.TextButton)19 Label (com.badlogic.gdx.scenes.scene2d.ui.Label)18 Table (com.badlogic.gdx.scenes.scene2d.ui.Table)15 Layout (com.badlogic.gdx.scenes.scene2d.utils.Layout)11 Skin (com.badlogic.gdx.scenes.scene2d.ui.Skin)10 InputEvent (com.badlogic.gdx.scenes.scene2d.InputEvent)9 Texture (com.badlogic.gdx.graphics.Texture)8 Group (com.badlogic.gdx.scenes.scene2d.Group)8 BitmapFont (com.badlogic.gdx.graphics.g2d.BitmapFont)7 InputListener (com.badlogic.gdx.scenes.scene2d.InputListener)7 TextureRegion (com.badlogic.gdx.graphics.g2d.TextureRegion)6 Dialog (com.badlogic.gdx.scenes.scene2d.ui.Dialog)6 Image (com.badlogic.gdx.scenes.scene2d.ui.Image)6 ScreenViewport (com.badlogic.gdx.utils.viewport.ScreenViewport)6 CheckBox (com.badlogic.gdx.scenes.scene2d.ui.CheckBox)5 ScrollPane (com.badlogic.gdx.scenes.scene2d.ui.ScrollPane)5 Slider (com.badlogic.gdx.scenes.scene2d.ui.Slider)5