Example usage for Java com.badlogic.gdx.scenes.scene2d Stage fields, constructors, methods, implement or subclass
The text is from its open source code.
Stage(Viewport viewport) Creates a stage with the specified viewport. | |
Stage() Creates a stage with a ScalingViewport set to Scaling#stretch . | |
Stage(Viewport viewport, Batch batch) Creates a stage with the specified viewport and batch. |
void | addAction(Action action) Adds an action to the root of the stage. |
void | addActor(Actor actor) Adds an actor to the root of the stage. |
boolean | addCaptureListener(EventListener listener) Adds a capture listener to the root. |
boolean | addListener(EventListener listener) Adds a listener to the root. |
void | cancelTouchFocusExcept(EventListener exceptListener, Actor exceptActor) Cancels touch focus for all listeners except the specified listener. |
void | clear() Removes the root's children, actions, and listeners. |
Array | getActors() Returns the root's child actors. |
Batch | getBatch() |
Camera | getCamera() The viewport's camera. |
float | getHeight() The viewport's world height. |
Actor | getKeyboardFocus() Gets the actor that will receive key events. |
Group | getRoot() Returns the root group which holds all actors in the stage. |
Actor | getScrollFocus() Gets the actor that will receive scroll events. |
Viewport | getViewport() |
float | getWidth() The viewport's world width. |
Actor | hit(float stageX, float stageY, boolean touchable) Returns the Actor at the specified location in stage coordinates. |
boolean | removeCaptureListener(EventListener listener) Removes a listener from the root. |
boolean | removeListener(EventListener listener) Removes a listener from the root. |
Vector2 | screenToStageCoordinates(Vector2 screenCoords) Transforms the screen coordinates to stage coordinates. |
void | setDebugAll(boolean debugAll) If true, debug lines are shown for all actors. |
void | setKeyboardFocus(Actor actor) Sets the actor that will receive key events. |
void | setScrollFocus(Actor actor) Sets the actor that will receive scroll events. |
void | unfocus(Actor actor) Removes the touch, keyboard, and scroll focus for the specified actor and any descendants. |
void | unfocusAll() Removes the touch, keyboard, and scroll focused actors. |