 |
BARE2D
|
|
Go to the documentation of this file.
13 for(
unsigned int i = 0; i <
m_screens.size(); i++) {
This is meant to be a parent for other, app-specific, screen classes, which is essentially where all ...
~ScreenList()
Destroys the screen list, "taking care" of the screen pointers it owns.
void moveToPreviousScreen()
Moves to the previous screen. Similar to moveToNextScreen, in that it makes sure everything's good!
virtual void onEntry()=0
This is pretty close to the init function. It is called every time the screen is entered.
std::vector< Screen * > m_screens
virtual void initScreen()=0
This is called once, at the start of the program, when the screen is added to the screen list.
void addScreen(Screen *screen)
Adds a screen to the list of screens, AKA the screen list. Requires non-nullptr. Also,...
Screen * m_previousScreen
void addEntryScreen(Screen *screen)
Adds a screen, and sets the current screen to this one.
void moveToNextScreen()
Moves to the next screen, updates needed variables. Also, exits old screen and enters new one.
virtual void onExit()=0
This is close to the destroy function, but is only called when the screen is exited,...
Screen * getCurrentScreen()
virtual int getNextScreenIndex() const =0
Returns the index of the next screen. It is recommended to keep a file, say, ScreenIndices....