Class MainMenuState

  • All Implemented Interfaces:
    org.newdawn.slick.ControlledInputReciever, org.newdawn.slick.ControllerListener, org.newdawn.slick.InputListener, org.newdawn.slick.KeyListener, org.newdawn.slick.MouseListener, org.newdawn.slick.state.GameState

    public class MainMenuState
    extends org.newdawn.slick.state.BasicGameState
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.newdawn.slick.Color backgroundColor  
      java.util.ArrayList<MenuButton> buttons  
      static int ID  
      private org.newdawn.slick.Image logo  
    • Constructor Summary

      Constructors 
      Constructor Description
      MainMenuState()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void enter​(org.newdawn.slick.GameContainer container, org.newdawn.slick.state.StateBasedGame game)  
      int getID()  
      void init​(org.newdawn.slick.GameContainer container, org.newdawn.slick.state.StateBasedGame game)  
      void leave​(org.newdawn.slick.GameContainer container, org.newdawn.slick.state.StateBasedGame game)  
      void render​(org.newdawn.slick.GameContainer container, org.newdawn.slick.state.StateBasedGame game, org.newdawn.slick.Graphics graphics)  
      void update​(org.newdawn.slick.GameContainer container, org.newdawn.slick.state.StateBasedGame game, int delta)  
      • Methods inherited from class org.newdawn.slick.state.BasicGameState

        controllerButtonPressed, controllerButtonReleased, controllerDownPressed, controllerDownReleased, controllerLeftPressed, controllerLeftReleased, controllerRightPressed, controllerRightReleased, controllerUpPressed, controllerUpReleased, inputEnded, inputStarted, isAcceptingInput, keyPressed, keyReleased, mouseClicked, mouseDragged, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, setInput
      • Methods inherited from class java.lang.Object

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

      • logo

        private final org.newdawn.slick.Image logo
      • backgroundColor

        private final org.newdawn.slick.Color backgroundColor
      • buttons

        public java.util.ArrayList<MenuButton> buttons
    • Constructor Detail

      • MainMenuState

        public MainMenuState()
    • Method Detail

      • init

        public void init​(org.newdawn.slick.GameContainer container,
                         org.newdawn.slick.state.StateBasedGame game)
                  throws org.newdawn.slick.SlickException
        Throws:
        org.newdawn.slick.SlickException
      • enter

        public void enter​(org.newdawn.slick.GameContainer container,
                          org.newdawn.slick.state.StateBasedGame game)
                   throws org.newdawn.slick.SlickException
        Specified by:
        enter in interface org.newdawn.slick.state.GameState
        Overrides:
        enter in class org.newdawn.slick.state.BasicGameState
        Throws:
        org.newdawn.slick.SlickException
      • leave

        public void leave​(org.newdawn.slick.GameContainer container,
                          org.newdawn.slick.state.StateBasedGame game)
                   throws org.newdawn.slick.SlickException
        Specified by:
        leave in interface org.newdawn.slick.state.GameState
        Overrides:
        leave in class org.newdawn.slick.state.BasicGameState
        Throws:
        org.newdawn.slick.SlickException
      • render

        public void render​(org.newdawn.slick.GameContainer container,
                           org.newdawn.slick.state.StateBasedGame game,
                           org.newdawn.slick.Graphics graphics)
                    throws org.newdawn.slick.SlickException
        Throws:
        org.newdawn.slick.SlickException
      • update

        public void update​(org.newdawn.slick.GameContainer container,
                           org.newdawn.slick.state.StateBasedGame game,
                           int delta)
                    throws org.newdawn.slick.SlickException
        Throws:
        org.newdawn.slick.SlickException
      • getID

        public int getID()
        Specified by:
        getID in interface org.newdawn.slick.state.GameState
        Specified by:
        getID in class org.newdawn.slick.state.BasicGameState