JMEditorEnvironment
Loading...
Searching...
No Matches
ScreenState Class Reference

#include <ScreenStateManager.h>

Public Member Functions

 ScreenState (ScreenState &)=delete
ScreenStateoperator= (const ScreenState &)=delete
 ScreenState (ScreenState &&)=default
ScreenStateoperator= (ScreenState &&)=default
virtual void display ()
 Is called once every frame in the draw loop.
virtual void setup ()
 Is called one time before being displayed.
bool internalSetup (JMwindow *Window)
 Is called by the screen state handler to set up the window.
bool isSetup () const
 Returns true if this screen states setup function has been called.
float midPoint (float a, float b)
 returns the median of two numbers.

Public Attributes

const char * screenTitle = " "
 The title of the screen state. This is displayed on the tab if multiple screen states exist.

Protected Attributes

JMwindow * window = nullptr
 The window that the screen state has been set up on.
JMGraphics * gr = nullptr

Detailed Description

The base class for a selectable screen state. When using a ScreenStateManager containing the derived ScreenStates, the user can navigate between the ScreenStates using tabs at the top of the screen. Create classes derived from this in order to use them with a ScreenStateManager. Put anything that needs to run once before this screen state is rendered in setup(), and put everthing that needs to run once every frame in display().


The documentation for this class was generated from the following file: