Class AbstractSimpleOverlay

  • Direct Known Subclasses:
    SimpleMenuOverlay, SimpleMessageOverlay

    public abstract class AbstractSimpleOverlay
    extends java.lang.Object
    Renderer for simple overlays. TODO: make color configurable?
    Since:
    0.6.0
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) int height
      Screen ratio.
      (package private) int width
      Screen ratio.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void render​(javax.media.opengl.GL2 gl)
      Main render method
      (package private) abstract void renderContents​(javax.media.opengl.GL2 gl)
      Render the actual overlay contents.
      void setSize​(int width, int height)
      Set screen ratio.
      • Methods inherited from class java.lang.Object

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

      • width

        int width
        Screen ratio.
      • height

        int height
        Screen ratio.
    • Constructor Detail

      • AbstractSimpleOverlay

        public AbstractSimpleOverlay()
    • Method Detail

      • render

        public final void render​(javax.media.opengl.GL2 gl)
        Main render method
        Parameters:
        gl - GL context
      • renderContents

        abstract void renderContents​(javax.media.opengl.GL2 gl)
        Render the actual overlay contents.
        Parameters:
        gl - GL context
      • setSize

        public void setSize​(int width,
                            int height)
        Set screen ratio.
        Parameters:
        width - Screen width
        height - Screen height