Class ActorUtils


  • public class ActorUtils
    extends java.lang.Object
    Actor related utils.
    • Constructor Summary

      Constructors 
      Constructor Description
      ActorUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void keepWithinStage​(com.badlogic.gdx.scenes.scene2d.Actor actor)
      Makes sures that actor will be fully visible in stage.
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ActorUtils

        public ActorUtils()
    • Method Detail

      • 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:
        java.lang.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.