diff --git a/src/example/main.cpp b/src/example/main.cpp index 9bcf5a4..48f5054 100644 --- a/src/example/main.cpp +++ b/src/example/main.cpp @@ -56,6 +56,7 @@ int main(int argc, char* argv[]) while (window.IsOpen()) true; + window.Stop(); diff --git a/src/sdlf/Screen.hpp b/src/sdlf/Screen.hpp new file mode 100644 index 0000000..12a742c --- /dev/null +++ b/src/sdlf/Screen.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include "SDL.h" + +namespace sf +{ + class IScreen + { + public: + + protected: + IScreen(); + + virtual void OnFocus() = 0; // Called when the screen is being switched to + virtual void OnDefocus() = 0; // Called when the screen is being switched from + virtual void OnUpdate(double frametime) = 0; // Called every frame + virtual void OnEvent(const SDL_Event& event) = 0; // Called after an event occurs + + private: + }; +} \ No newline at end of file