Package com.mygdx.game.UI
Class Page
java.lang.Object
com.badlogic.gdx.ScreenAdapter
com.mygdx.game.UI.Page
- All Implemented Interfaces:
com.badlogic.gdx.Screen
- Direct Known Subclasses:
EndScreen,GameScreen,MenuScreen
public abstract class Page
extends com.badlogic.gdx.ScreenAdapter
Base class for UI screens. Contains and draws UI actors added in subclasses.
-
Field Summary
Fields Modifier and Type Field Description protected java.util.ArrayList<com.badlogic.gdx.scenes.scene2d.Actor>actors -
Constructor Summary
Constructors Constructor Description Page(PirateGame parent) -
Method Summary
Modifier and Type Method Description protected abstract voidCreateActors()voidhide()Called once the page is hidden.voidrender(float delta)draws the stage and acts upon it also calls updatevoidresize(int width, int height)Called once the window is resized updates constants and stagevoidshow()Called once the page is show sets input handler and adds actorsprotected voidupdate()Called once per frameMethods inherited from class com.badlogic.gdx.ScreenAdapter
dispose, pause, resumeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
actors
protected java.util.ArrayList<com.badlogic.gdx.scenes.scene2d.Actor> actors
-
-
Constructor Details
-
Page
-
-
Method Details
-
CreateActors
protected abstract void CreateActors() -
show
public void show()Called once the page is show sets input handler and adds actors- Specified by:
showin interfacecom.badlogic.gdx.Screen- Overrides:
showin classcom.badlogic.gdx.ScreenAdapter
-
render
public void render(float delta)draws the stage and acts upon it also calls update- Specified by:
renderin interfacecom.badlogic.gdx.Screen- Overrides:
renderin classcom.badlogic.gdx.ScreenAdapter- Parameters:
delta- delta time
-
hide
public void hide()Called once the page is hidden. sets input handler to null and clears teh stage- Specified by:
hidein interfacecom.badlogic.gdx.Screen- Overrides:
hidein classcom.badlogic.gdx.ScreenAdapter
-
resize
public void resize(int width, int height)Called once the window is resized updates constants and stage- Specified by:
resizein interfacecom.badlogic.gdx.Screen- Overrides:
resizein classcom.badlogic.gdx.ScreenAdapter- Parameters:
width- new dim xheight- new dom y
-
update
protected void update()Called once per frame
-