Class 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 game
      private 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 one
      private 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 screen
      void resize​(int width, int height)  
      void resume()  
      void show()  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • 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 screen
        previousScreen - Screen where the popup was created
        game - instance of the game
    • Method Detail

      • show

        public void show()
        Specified by:
        show in interface com.badlogic.gdx.Screen
      • render

        public void render​(float delta)
        Rendering the screen
        Specified by:
        render in interface com.badlogic.gdx.Screen
        Parameters:
        delta - time delta
      • resize

        public void resize​(int width,
                           int height)
        Specified by:
        resize in interface com.badlogic.gdx.Screen
      • pause

        public void pause()
        Specified by:
        pause in interface com.badlogic.gdx.Screen
      • resume

        public void resume()
        Specified by:
        resume in interface com.badlogic.gdx.Screen
      • hide

        public void hide()
        Specified by:
        hide in interface com.badlogic.gdx.Screen
      • dispose

        public void dispose()
        Specified by:
        dispose in interface com.badlogic.gdx.Screen