29 #ifndef NOMLIB_SDL2_GAMESTATES_HEADERS
30 #define NOMLIB_SDL2_GAMESTATES_HEADERS
36 #include "nomlib/config.hpp"
37 #include "nomlib/system/IState.hpp"
38 #include "nomlib/graphics/IDrawable.hpp"
47 typedef SDL_Event EventType;
49 static void onEvent ( EventType* );
52 static void update (
float );
58 static void ChangeState ( std::unique_ptr<IState> state );
59 static void PushState ( std::unique_ptr<IState> state );
60 static void PopState (
void );
61 static void PopStateThenChangeState ( std::unique_ptr<IState> state );
62 static void PopState ( int32 response );
65 static std::vector<std::unique_ptr<IState>>
states;
73 #endif // NOMLIB_GAMESTATES_HEADERS defined
static void draw(IDrawable::RenderTarget)
State rendering.
static void onEvent(EventType *)
State events handling.
static std::vector< std::unique_ptr< IState > > states
States stack; we hold pointer references to IState inherited classes.
static void update(float)
State logic.
static void ChangeState(std::unique_ptr< IState > state)
State management.