Java com.badlogic.gdx.scenes.scene2d Stage fields, constructors, methods, implement or subclass

Example usage for Java com.badlogic.gdx.scenes.scene2d Stage fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.badlogic.gdx.scenes.scene2d Stage.

The text is from its open source code.

Subclass

com.badlogic.gdx.scenes.scene2d.Stage has subclasses.
Click this link to see all its subclasses.

Constructor

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.

Method

voidaddAction(Action action)
Adds an action to the root of the stage.
voidaddActor(Actor actor)
Adds an actor to the root of the stage.
booleanaddCaptureListener(EventListener listener)
Adds a capture listener to the root.
booleanaddListener(EventListener listener)
Adds a listener to the root.
voidcancelTouchFocusExcept(EventListener exceptListener, Actor exceptActor)
Cancels touch focus for all listeners except the specified listener.
voidclear()
Removes the root's children, actions, and listeners.
ArraygetActors()
Returns the root's child actors.
BatchgetBatch()
CameragetCamera()
The viewport's camera.
floatgetHeight()
The viewport's world height.
ActorgetKeyboardFocus()
Gets the actor that will receive key events.
GroupgetRoot()
Returns the root group which holds all actors in the stage.
ActorgetScrollFocus()
Gets the actor that will receive scroll events.
ViewportgetViewport()
floatgetWidth()
The viewport's world width.
Actorhit(float stageX, float stageY, boolean touchable)
Returns the Actor at the specified location in stage coordinates.
booleanremoveCaptureListener(EventListener listener)
Removes a listener from the root.
booleanremoveListener(EventListener listener)
Removes a listener from the root.
Vector2screenToStageCoordinates(Vector2 screenCoords)
Transforms the screen coordinates to stage coordinates.
voidsetDebugAll(boolean debugAll)
If true, debug lines are shown for all actors.
voidsetKeyboardFocus(Actor actor)
Sets the actor that will receive key events.
voidsetScrollFocus(Actor actor)
Sets the actor that will receive scroll events.
voidunfocus(Actor actor)
Removes the touch, keyboard, and scroll focus for the specified actor and any descendants.
voidunfocusAll()
Removes the touch, keyboard, and scroll focused actors.