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 DragonBoatRacegameInstance of the gameprivate java.lang.StringmessageText in the middle of the screen.private com.badlogic.gdx.graphics.g2d.BitmapFontmessageFontprivate com.badlogic.gdx.graphics.g2d.GlyphLayoutmessageLayoutprivate com.badlogic.gdx.ScreenpreviousScreenScreen which lead to this oneprivate java.lang.StringtitleText at the top of the screen.private com.badlogic.gdx.graphics.g2d.BitmapFonttitleFontprivate com.badlogic.gdx.graphics.g2d.GlyphLayouttitleLayout
-
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 voiddispose()voidhide()voidpause()voidrender(float delta)Rendering the screenvoidresize(int width, int height)voidresume()voidshow()
-
-
-
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:
showin interfacecom.badlogic.gdx.Screen
-
render
public void render(float delta)
Rendering the screen- Specified by:
renderin interfacecom.badlogic.gdx.Screen- Parameters:
delta- time delta
-
resize
public void resize(int width, int height)- Specified by:
resizein interfacecom.badlogic.gdx.Screen
-
pause
public void pause()
- Specified by:
pausein interfacecom.badlogic.gdx.Screen
-
resume
public void resume()
- Specified by:
resumein interfacecom.badlogic.gdx.Screen
-
hide
public void hide()
- Specified by:
hidein interfacecom.badlogic.gdx.Screen
-
dispose
public void dispose()
- Specified by:
disposein interfacecom.badlogic.gdx.Screen
-
-