Update README.md
This commit is contained in:
parent
7469e3efc7
commit
e0a66d72bd
10
README.md
10
README.md
|
@ -18,10 +18,10 @@ public:
|
|||
|
||||
private:
|
||||
virtual bool OnCreate() { return true; }
|
||||
virtual void OnClose() { }
|
||||
virtual bool OnEvent(const SDL_Event& event) { return true;}
|
||||
virtual bool OnUpdate(double frametime) { return true; }
|
||||
virtual void OnRender(SDL_Renderer* renderer) { }
|
||||
virtual void OnClose() { }
|
||||
virtual bool OnEvent(const SDL_Event& event) { return true;}
|
||||
virtual bool OnUpdate(double frametime) { return true; }
|
||||
virtual void OnRender(SDL_Renderer* renderer) { }
|
||||
};
|
||||
```
|
||||
|
||||
|
@ -44,4 +44,4 @@ the only difference being `IScreen::OnFocus()` and `IScreen::OnDefocus()` which
|
|||
A window holds a pointer to an `sf::IScreen`. If that pointer is `nullptr`, the above callbacks will be called. If it isn't `nullptr` then the callbacks from the `sf::IScreen` will be called instead.
|
||||
You can switch screens via a the `IWindow::SwitchScreen()` function.
|
||||
|
||||
To use a screen, you simple derive from `sf::IScreen` and implement the callbacks. `IScreen::OnFocus()` receives the calling `sf::IWindow` as a parameter.
|
||||
To use a screen, you simple derive from `sf::IScreen` and implement the callbacks. `IScreen::OnFocus()` receives the calling `sf::IWindow` as a parameter.
|
||||
|
|
Loading…
Reference in a new issue