Package gaiasky.util.scene2d
Class ActorUtils
java.lang.Object
gaiasky.util.scene2d.ActorUtils
Actor related utils.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidkeepWithinStage(com.badlogic.gdx.scenes.scene2d.Actor actor) Makes sures that actor will be fully visible in stage.static voidkeepWithinStage(com.badlogic.gdx.scenes.scene2d.Stage stage, com.badlogic.gdx.scenes.scene2d.Actor actor) Makes sures that actor will be fully visible in stage.
-
Constructor Details
-
ActorUtils
public ActorUtils()
-
-
Method Details
-
keepWithinStage
public static void keepWithinStage(com.badlogic.gdx.scenes.scene2d.Actor actor) Makes sures that actor will be fully visible in stage. If it's necessary actor position will be changed to fit it on screen.- Throws:
IllegalStateException- if actor does not belong to any stage.
-
keepWithinStage
public static void keepWithinStage(com.badlogic.gdx.scenes.scene2d.Stage stage, com.badlogic.gdx.scenes.scene2d.Actor actor) Makes sures that actor will be fully visible in stage. If it's necessary actor position will be changed to fit it on screen.
-