Package com.dragonboatrace.screens
Class PopupScreen
- java.lang.Object
-
- com.dragonboatrace.screens.PopupScreen
-
- All Implemented Interfaces:
com.badlogic.gdx.Screen
public class PopupScreen extends java.lang.Object implements com.badlogic.gdx.Screen
-
-
Field Summary
Fields Modifier and Type Field Description private DragonBoatRace
game
Instance of the gameprivate java.lang.String
message
Text in the middle of the screen.private com.badlogic.gdx.graphics.g2d.BitmapFont
messageFont
private com.badlogic.gdx.graphics.g2d.GlyphLayout
messageLayout
private com.badlogic.gdx.Screen
previousScreen
Screen which lead to this oneprivate java.lang.String
title
Text at the top of the screen.private com.badlogic.gdx.graphics.g2d.BitmapFont
titleFont
private com.badlogic.gdx.graphics.g2d.GlyphLayout
titleLayout
-
Constructor Summary
Constructors Constructor Description PopupScreen(java.lang.String message, com.badlogic.gdx.Screen previousScreen, DragonBoatRace game)
Instantiates the screen
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
void
hide()
void
pause()
void
render(float delta)
Rendering the screenvoid
resize(int width, int height)
void
resume()
void
show()
-
-
-
Field Detail
-
game
private final DragonBoatRace game
Instance of the game
-
previousScreen
private final com.badlogic.gdx.Screen previousScreen
Screen which lead to this one
-
titleFont
private final com.badlogic.gdx.graphics.g2d.BitmapFont titleFont
-
messageFont
private final com.badlogic.gdx.graphics.g2d.BitmapFont messageFont
-
titleLayout
private final com.badlogic.gdx.graphics.g2d.GlyphLayout titleLayout
-
messageLayout
private final com.badlogic.gdx.graphics.g2d.GlyphLayout messageLayout
-
title
private final java.lang.String title
Text at the top of the screen.- See Also:
- Constant Field Values
-
message
private final java.lang.String message
Text in the middle of the screen. Passed to the constructor.
-
-
Constructor Detail
-
PopupScreen
PopupScreen(java.lang.String message, com.badlogic.gdx.Screen previousScreen, DragonBoatRace game)
Instantiates the screen- Parameters:
message
- Printed in the center of the screenpreviousScreen
- Screen where the popup was createdgame
- instance of the game
-
-
Method Detail
-
show
public void show()
- Specified by:
show
in interfacecom.badlogic.gdx.Screen
-
render
public void render(float delta)
Rendering the screen- Specified by:
render
in interfacecom.badlogic.gdx.Screen
- Parameters:
delta
- time delta
-
resize
public void resize(int width, int height)
- Specified by:
resize
in interfacecom.badlogic.gdx.Screen
-
pause
public void pause()
- Specified by:
pause
in interfacecom.badlogic.gdx.Screen
-
resume
public void resume()
- Specified by:
resume
in interfacecom.badlogic.gdx.Screen
-
hide
public void hide()
- Specified by:
hide
in interfacecom.badlogic.gdx.Screen
-
dispose
public void dispose()
- Specified by:
dispose
in interfacecom.badlogic.gdx.Screen
-
-