Package com.dicycat.kroy.scenes
Class OptionsWindow
- java.lang.Object
-
- com.dicycat.kroy.scenes.OptionsWindow
-
public class OptionsWindow extends java.lang.Object
Options window- Author:
- Michele Imbriani
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OptionsWindow.State
Allows to have multiple 'pages' of the Option window without having to create several stages.
-
Field Summary
Fields Modifier and Type Field Description com.badlogic.gdx.scenes.scene2d.Stage
stage
static OptionsWindow.State
state
com.badlogic.gdx.scenes.scene2d.ui.Table
table
-
Constructor Summary
Constructors Constructor Description OptionsWindow(Kroy game)
The important feature is the updateDraw() method which can be found at the bottom.
-
Method Summary
Modifier and Type Method Description void
clickCheck(boolean fromMenu)
Takes screen as attribute because the 'back' button behaves differently based on whether the optionwindow was called from menu or gamescreenvoid
updateDraw()
This function allows the table to change its content based on which page of the OptionsWindow we are on.void
visibility(boolean state)
-
-
-
Field Detail
-
stage
public com.badlogic.gdx.scenes.scene2d.Stage stage
-
table
public com.badlogic.gdx.scenes.scene2d.ui.Table table
-
state
public static OptionsWindow.State state
-
-
Constructor Detail
-
OptionsWindow
public OptionsWindow(Kroy game)
The important feature is the updateDraw() method which can be found at the bottom.- Parameters:
game
-
-
-
Method Detail
-
visibility
public void visibility(boolean state)
-
clickCheck
public void clickCheck(boolean fromMenu)
Takes screen as attribute because the 'back' button behaves differently based on whether the optionwindow was called from menu or gamescreen- Parameters:
fromMenu
-
-
updateDraw
public void updateDraw()
This function allows the table to change its content based on which page of the OptionsWindow we are on. By being called in the Screen's render method, the Options window gets reset and refreshed every rendering loop: this way we are able to have several 'pages' within the same table.
-
-