public class Overlay
extends com.badlogic.gdx.scenes.scene2d.Stage
Modifier and Type | Field and Description |
---|---|
private Drawer |
drawer
Object defining QOL drawing functions for rectangles and on-screen tables
Used in this class to draw overlay area
|
private com.badlogic.gdx.graphics.Color |
fillColor
The colour of the overlay's core
|
private com.badlogic.gdx.graphics.Color |
lineColor
The colour of the overlay's border
|
private int |
lineThickness
Thickness of the overlay region's border
|
private float |
regionHeight
Height of the overlay region
|
private float |
regionWidth
Width of the overlay region
|
private com.badlogic.gdx.scenes.scene2d.ui.Table |
table
Table providing spatial framework for the overlay
|
Constructor and Description |
---|
Overlay(com.badlogic.gdx.Game game,
com.badlogic.gdx.graphics.Color fillColor,
com.badlogic.gdx.graphics.Color lineColour,
float regionWidth,
float regionHeight,
int lineThickness)
Creates a stage that itself places a table of the specified parameters in the centre of the screen
The overlay's [draw()] method is unlike that of the standard Stage class as it also draws a bordered
rectangle behind the overlay region, hence rendering it a true overlay
|
Modifier and Type | Method and Description |
---|---|
void |
draw()
Draws every actor on the core stage (along with a complementary bordered background) on to the next frame in
the game's rendering pipeline
|
com.badlogic.gdx.scenes.scene2d.ui.Table |
table()
Returns the table that serves as the overlay's spatial framework
|
act, act, addAction, addActor, addCaptureListener, addListener, addTouchFocus, calculateScissors, cancelTouchFocus, cancelTouchFocus, cancelTouchFocusExcept, clear, dispose, getActionsRequestRendering, getActors, getBatch, getCamera, getDebugColor, getHeight, getKeyboardFocus, getRoot, getScrollFocus, getViewport, getWidth, hit, keyDown, keyTyped, keyUp, mouseMoved, removeCaptureListener, removeListener, removeTouchFocus, screenToStageCoordinates, scrolled, setActionsRequestRendering, setDebugAll, setDebugInvisible, setDebugParentUnderMouse, setDebugTableUnderMouse, setDebugTableUnderMouse, setDebugUnderMouse, setKeyboardFocus, setScrollFocus, setViewport, stageToScreenCoordinates, toScreenCoordinates, touchDown, touchDragged, touchUp, unfocus, unfocusAll
private com.badlogic.gdx.scenes.scene2d.ui.Table table
private Drawer drawer
private float regionWidth
private float regionHeight
private int lineThickness
private com.badlogic.gdx.graphics.Color fillColor
private com.badlogic.gdx.graphics.Color lineColor
public Overlay(com.badlogic.gdx.Game game, com.badlogic.gdx.graphics.Color fillColor, com.badlogic.gdx.graphics.Color lineColour, float regionWidth, float regionHeight, int lineThickness)
game
- Variable storing the game's state for rendering purposesfillColor
- The colour of the overlay's backgroundlineColour
- The colour of the overlay's borderregionWidth
- The width of the overlayregionHeight
- The height of the overlaylineThickness
- The thickness of the overlay's borderpublic void draw()
draw
in class com.badlogic.gdx.scenes.scene2d.Stage
public com.badlogic.gdx.scenes.scene2d.ui.Table table()