Package gaiasky.util.scene2d
Class ActorUtils
java.lang.Object
gaiasky.util.scene2d.ActorUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
keepWithinStage
(com.badlogic.gdx.scenes.scene2d.Actor actor) Makes sure that the actor will be fully visible in the stage.static void
keepWithinStage
(com.badlogic.gdx.scenes.scene2d.Stage stage, com.badlogic.gdx.scenes.scene2d.Actor actor) Ensures the actor is fully visible in stage.
-
Constructor Details
-
ActorUtils
public ActorUtils()
-
-
Method Details
-
keepWithinStage
public static void keepWithinStage(com.badlogic.gdx.scenes.scene2d.Actor actor) Makes sure that the actor will be fully visible in the stage. If necessary, the actor position will be changed to fit on screen.- Throws:
IllegalStateException
- if the actor is not in a stage.
-
keepWithinStage
public static void keepWithinStage(com.badlogic.gdx.scenes.scene2d.Stage stage, com.badlogic.gdx.scenes.scene2d.Actor actor) Ensures the actor is fully visible in stage.
-