Class Slideshow

java.lang.Object
com.badlogic.gdx.ApplicationAdapter
com.devcharles.piazzapanic.scene2d.Slideshow
All Implemented Interfaces:
com.badlogic.gdx.ApplicationListener, com.badlogic.gdx.Screen

public class Slideshow extends com.badlogic.gdx.ApplicationAdapter implements com.badlogic.gdx.Screen
A screen that displays a slideshow of images.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Slideshow type enumeration.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private com.badlogic.gdx.graphics.g2d.Batch
     
    (package private) com.badlogic.gdx.graphics.OrthographicCamera
     
    private int
     
    private com.badlogic.gdx.scenes.scene2d.ui.TextButton
     
    private com.badlogic.gdx.scenes.scene2d.ui.TextButton
     
    private com.badlogic.gdx.scenes.scene2d.ui.TextButton
     
    private com.badlogic.gdx.scenes.scene2d.ui.Skin
     
    private com.badlogic.gdx.graphics.g2d.Sprite
     
    private com.badlogic.gdx.scenes.scene2d.Stage
     
    private com.badlogic.gdx.graphics.Texture[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Slideshow(com.badlogic.gdx.Game game, Slideshow.Type type)
    Create a new slideshow screen.
    Slideshow(com.badlogic.gdx.Game game, Slideshow.Type type, com.badlogic.gdx.Screen savedScreen)
    Create a new slideshow screen in a running game.
  • Method Summary

    Modifier and Type
    Method
    Description
    private com.badlogic.gdx.scenes.scene2d.ui.Table
     
    void
    Called when the Application is destroyed.
    void
    Called when this screen is no longer the current screen for a Game.
    void
    render(float delta)
    Called when the screen should render itself.
    void
    resize(int width, int height)
    Called when the Application is resized.
    void
    Called when this screen becomes the current screen for a Game.
    private void
     

    Methods inherited from class com.badlogic.gdx.ApplicationAdapter

    create, pause, render, resume

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.badlogic.gdx.Screen

    pause, resume
  • Field Details

    • camera

      com.badlogic.gdx.graphics.OrthographicCamera camera
    • stage

      private com.badlogic.gdx.scenes.scene2d.Stage stage
    • skin

      private com.badlogic.gdx.scenes.scene2d.ui.Skin skin
    • batch

      private com.badlogic.gdx.graphics.g2d.Batch batch
    • sprite

      private com.badlogic.gdx.graphics.g2d.Sprite sprite
    • textures

      private com.badlogic.gdx.graphics.Texture[] textures
    • currentPage

      private int currentPage
    • leftButton

      private com.badlogic.gdx.scenes.scene2d.ui.TextButton leftButton
    • rightButton

      private com.badlogic.gdx.scenes.scene2d.ui.TextButton rightButton
    • exit

      private com.badlogic.gdx.scenes.scene2d.ui.TextButton exit
  • Constructor Details

    • Slideshow

      public Slideshow(com.badlogic.gdx.Game game, Slideshow.Type type)
      Create a new slideshow screen.
      Parameters:
      game - PiazzaPanic game instance for changing screens.
      type - Slideshow.Type of slideshow to create.
    • Slideshow

      public Slideshow(com.badlogic.gdx.Game game, Slideshow.Type type, com.badlogic.gdx.Screen savedScreen)
      Create a new slideshow screen in a running game.
      Parameters:
      game - PiazzaPanic game instance for changing screens.
      type - Slideshow.Type of slideshow to create.
      savedScreen - the GameScreen to return to after this screen is closed.
  • Method Details

    • buildTable

      private com.badlogic.gdx.scenes.scene2d.ui.Table buildTable()
    • updatePage

      private void updatePage()
    • show

      public void show()
      Description copied from interface: com.badlogic.gdx.Screen
      Called when this screen becomes the current screen for a Game.
      Specified by:
      show in interface com.badlogic.gdx.Screen
    • render

      public void render(float delta)
      Description copied from interface: com.badlogic.gdx.Screen
      Called when the screen should render itself.
      Specified by:
      render in interface com.badlogic.gdx.Screen
      Parameters:
      delta - The time in seconds since the last render.
    • resize

      public void resize(int width, int height)
      Description copied from interface: com.badlogic.gdx.ApplicationListener
      Called when the Application is resized. This can happen at any point during a non-paused state but will never happen before a call to ApplicationListener.create().
      Specified by:
      resize in interface com.badlogic.gdx.ApplicationListener
      Specified by:
      resize in interface com.badlogic.gdx.Screen
      Overrides:
      resize in class com.badlogic.gdx.ApplicationAdapter
      Parameters:
      width - the new width in pixels
      height - the new height in pixels
      See Also:
      • ApplicationListener.resize(int, int)
    • dispose

      public void dispose()
      Description copied from interface: com.badlogic.gdx.ApplicationListener
      Called when the Application is destroyed. Preceded by a call to ApplicationListener.pause().
      Specified by:
      dispose in interface com.badlogic.gdx.ApplicationListener
      Specified by:
      dispose in interface com.badlogic.gdx.Screen
      Overrides:
      dispose in class com.badlogic.gdx.ApplicationAdapter
    • hide

      public void hide()
      Description copied from interface: com.badlogic.gdx.Screen
      Called when this screen is no longer the current screen for a Game.
      Specified by:
      hide in interface com.badlogic.gdx.Screen