Added Screen interface
This commit is contained in:
parent
fd43b8917c
commit
90c3d18f19
2 changed files with 22 additions and 0 deletions
21
src/sdlf/Screen.hpp
Normal file
21
src/sdlf/Screen.hpp
Normal file
|
@ -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:
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue