Class SimpleMenuOverlay

  • All Implemented Interfaces:
    java.awt.event.MouseListener, java.util.EventListener

    public abstract class SimpleMenuOverlay
    extends AbstractSimpleOverlay
    implements java.awt.event.MouseListener
    Simple menu overlay. TODO: Hover effects?
    Since:
    0.6.0
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) int fontsize
      Font size.
      private java.util.ArrayList<java.lang.String> options
      Options to display.
      (package private) com.jogamp.opengl.util.awt.TextRenderer renderer
      Text renderer
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleMenuOverlay()
      Constructor.
    • Field Detail

      • renderer

        com.jogamp.opengl.util.awt.TextRenderer renderer
        Text renderer
      • options

        private java.util.ArrayList<java.lang.String> options
        Options to display.
      • fontsize

        int fontsize
        Font size.
    • Constructor Detail

      • SimpleMenuOverlay

        public SimpleMenuOverlay()
        Constructor.
    • Method Detail

      • mouseClicked

        public void mouseClicked​(java.awt.event.MouseEvent e)
        Specified by:
        mouseClicked in interface java.awt.event.MouseListener
      • menuItemClicked

        public abstract void menuItemClicked​(int item)
        Callback when a menu item was clicked.
        Parameters:
        item - Item number that was clicked.
      • mousePressed

        public void mousePressed​(java.awt.event.MouseEvent e)
        Specified by:
        mousePressed in interface java.awt.event.MouseListener
      • mouseReleased

        public void mouseReleased​(java.awt.event.MouseEvent e)
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener
      • mouseEntered

        public void mouseEntered​(java.awt.event.MouseEvent e)
        Specified by:
        mouseEntered in interface java.awt.event.MouseListener
      • mouseExited

        public void mouseExited​(java.awt.event.MouseEvent e)
        Specified by:
        mouseExited in interface java.awt.event.MouseListener
      • getOptions

        public java.util.ArrayList<java.lang.String> getOptions()
        Returns:
        the options
      • setOptions

        public void setOptions​(java.util.ArrayList<java.lang.String> options)
        Parameters:
        options - the options to set