Package com.misc

Class BackgroundBox


  • public class BackgroundBox
    extends com.badlogic.gdx.scenes.scene2d.Actor
    Custom actor to allow for a shape to be rendered on the stage. Used as backgrounds to actors in the car park menu.
    • Constructor Summary

      Constructors 
      Constructor Description
      BackgroundBox​(int width, int height, com.badlogic.gdx.graphics.Color color)
      Constructor to create a rectangle
      BackgroundBox​(int width, int height, com.badlogic.gdx.graphics.Color color, int radius)
      Constructor to create a rounded rectangle
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void draw​(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha)  
      • Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor

        act, addAction, addCaptureListener, addListener, ancestorsVisible, clear, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, debug, drawDebug, drawDebugBounds, fire, firstAscendant, getActions, getCaptureListeners, getColor, getDebug, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getUserObject, getWidth, getX, getX, getY, getY, getZIndex, hasActions, hasKeyboardFocus, hasParent, hasScrollFocus, hit, isAscendantOf, isDescendantOf, isTouchable, isTouchFocusListener, isTouchFocusTarget, isVisible, localToActorCoordinates, localToAscendantCoordinates, localToParentCoordinates, localToScreenCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, positionChanged, remove, removeAction, removeCaptureListener, removeListener, rotateBy, rotationChanged, scaleBy, scaleBy, screenToLocalCoordinates, setBounds, setColor, setColor, setDebug, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setParent, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setStage, setTouchable, setUserObject, setVisible, setWidth, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, sizeChanged, stageToLocalCoordinates, toBack, toFront, toString
      • Methods inherited from class java.lang.Object

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

      • BackgroundBox

        public BackgroundBox​(int width,
                             int height,
                             com.badlogic.gdx.graphics.Color color)
        Constructor to create a rectangle
        Parameters:
        width - of rectangle
        height - of rectangle
        color - of the box
      • BackgroundBox

        public BackgroundBox​(int width,
                             int height,
                             com.badlogic.gdx.graphics.Color color,
                             int radius)
        Constructor to create a rounded rectangle
        Parameters:
        width - of rectangle
        height - of rectangle
        color - of the box
        radius - of the corners
    • Method Detail

      • draw

        public void draw​(com.badlogic.gdx.graphics.g2d.Batch batch,
                         float parentAlpha)
        Overrides:
        draw in class com.badlogic.gdx.scenes.scene2d.Actor