supertux
|
Abstract base class for code the MainLoop runs exclusively and full-screen. More...
#include <screen.hpp>
Public Member Functions | |
virtual void | setup () |
gets called before this screen gets activated (which is at least once before the first draw or update call | |
virtual void | leave () |
gets called when the current screen is temporarily suspended | |
virtual void | draw (Compositor &compositor)=0 |
gets called once per frame. More... | |
virtual void | update (float dt_sec, const Controller &controller)=0 |
gets called for once (per logical) frame. More... | |
virtual IntegrationStatus | get_status () const =0 |
Gives details about what the user is doing right now. More... | |
Abstract base class for code the MainLoop runs exclusively and full-screen.
Examples of Screens are: The TitleScreen, a WorldMap, a level's GameSession, a TextScroller, ...
|
pure virtual |
gets called once per frame.
The screen should draw itself in this function. State changes should not be done in this function, but rather in update
Implemented in GameSession, Editor, worldmap::WorldSelect, ParticleEditor, TitleScreen, LevelIntro, LevelsetScreen, TextScrollerScreen, and worldmap::WorldMapScreen.
|
pure virtual |
Gives details about what the user is doing right now.
Implemented in GameSession, Editor, ParticleEditor, worldmap::WorldSelect, TitleScreen, LevelsetScreen, LevelIntro, TextScrollerScreen, and worldmap::WorldMapScreen.
|
pure virtual |
gets called for once (per logical) frame.
Screens should do their state updates and logic here
Implemented in GameSession, Editor, worldmap::WorldSelect, ParticleEditor, TitleScreen, LevelIntro, LevelsetScreen, TextScrollerScreen, and worldmap::WorldMapScreen.