1 #ifndef BLOBS_APP_STATE_HPP_
2 #define BLOBS_APP_STATE_HPP_
17 friend class Application;
19 void Handle(const SDL_Event &);
20 void Handle(const SDL_WindowEvent &);
22 void Render(graphics::Viewport &);
24 virtual void OnEnter() { }
25 virtual void OnResume() { }
26 virtual void OnPause() { }
27 virtual void OnExit() { }
29 virtual void OnFocus() { }
30 virtual void OnBlur() { }
31 virtual void OnResize(int w, int h) { }
33 virtual void OnKeyDown(const SDL_KeyboardEvent &) { }
34 virtual void OnKeyUp(const SDL_KeyboardEvent &) { }
35 virtual void OnMouseDown(const SDL_MouseButtonEvent &) { }
36 virtual void OnMouseUp(const SDL_MouseButtonEvent &) { }
37 virtual void OnMouseMotion(const SDL_MouseMotionEvent &) { }
38 virtual void OnMouseWheel(const SDL_MouseWheelEvent &) { }
39 virtual void OnQuit();
41 virtual void OnUpdate(int dt) { }
42 virtual void OnRender(graphics::Viewport &) { }
45 Application *app = nullptr;