Class Menu

All Implemented Interfaces:
IRenderable, Tweenable, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener

public class Menu
extends ImageComponentList
The Class Menu.
  • Constructor Details

    • Menu

      public Menu​(double x, double y, double width, double height, java.lang.String... items)
    • Menu

      public Menu​(double x, double y, double width, double height, Spritesheet background, java.lang.String... items)
  • Method Details

    • getCurrentSelection

      public int getCurrentSelection()
    • onChange

      public void onChange​(java.util.function.IntConsumer cons)
    • prepare

      public void prepare()
      Description copied from class: GuiComponent
      Prepare the GuiComponent and all its child Components (Makes the GuiComponent visible and adds mouse listeners.). This is, for example, done right before switching to a new screen.
      Overrides:
      prepare in class ImageComponentList
    • setCurrentSelection

      public void setCurrentSelection​(int currentSelection)