SuperTuxKart
|
A concrete scene manager, derived from GUIEngine's AbastractSceneManager. More...
#include <state_manager.hpp>
Classes | |
class | ActivePlayer |
Represents a player that is currently playing. More... | |
Public Member Functions | |
const PtrVector< ActivePlayer, HOLD > & | getActivePlayers () |
ActivePlayer * | getActivePlayer (const int id) |
const PlayerProfile * | getActivePlayerProfile (const int id) |
int | createActivePlayer (PlayerProfile *profile, InputDevice *device) |
void | removeActivePlayer (int id) |
unsigned int | activePlayerCount () |
void | resetActivePlayers () |
void | escapePressed () |
implementing callback from base class AbstractStateManager | |
virtual void | onGameStateChange (GUIEngine::GameState new_state) |
implementing callback from base class AbstractStateManager | |
virtual void | onStackEmptied () |
implementing callback from base class AbstractStateManager | |
virtual void | onTopMostScreenChanged () |
implementing callback from base class AbstractStateManager | |
void | clearMenuStack () |
Public Member Functions inherited from GUIEngine::AbstractStateManager | |
AbstractStateManager () | |
inits an AbstractStateManager is MENU state | |
void | pushScreen (Screen *screen) |
adds a menu at the top of the screens stack | |
void | replaceTopMostScreen (Screen *screen, GUIEngine::GameState gameState=GUIEngine::CURRENT) |
replaces the menu at the top of the screens stack (i.e. | |
void | popMenu () |
removes the menu at the top of the screens stack If the stack becomes empty after performing the pop (i.e. | |
void | resetAndGoToScreen (Screen *screen) |
clears the menu stack and starts afresh with a new stack containing only the given screen | |
void | resetAndSetStack (Screen *screens[]) |
Sets the whole menu stack. | |
void | onResize () |
Called when resizing of stk window. | |
void | enterMenuState () |
Used in no graphics STK to enter menu screen (when server is idle state) | |
void | enterGameState () |
call to make the state manager enter game mode. | |
GameState | getGameState () |
void | reshowTopMostMenu () |
to be called after e.g. | |
template<typename T > | |
void | hardResetAndGoToScreen () |
virtual void | escapePressed ()=0 |
callback invoked whenever escape was pressed (or any similar cancel operation) | |
virtual void | onGameStateChange (GameState new_state)=0 |
callback invoked when game mode changes (e.g. | |
virtual void | onStackEmptied ()=0 |
callback invoked when the stack is emptied (all menus are popped out). | |
virtual void | onTopMostScreenChanged ()=0 |
unsigned int | getMenuStackSize () const |
Returns the number of screens on the stack. | |
Static Public Member Functions | |
static StateManager * | get () |
static void | deallocate () |
static void | clear () |
Private Member Functions | |
void | updateActivePlayerIDs () |
Private Attributes | |
PtrVector< ActivePlayer, HOLD > | m_active_players |
A list of all currently playing players. | |
Additional Inherited Members | |
Protected Member Functions inherited from GUIEngine::AbstractStateManager | |
void | pushMenu (Screen *screen) |
void | setGameState (GameState state) |
Protected Attributes inherited from GUIEngine::AbstractStateManager | |
std::atomic< GameState > | m_game_mode |
Whether we are in game mode. | |
std::vector< std::pair< std::string, Screen * > > | m_menu_stack |
This stack will contain menu names (e.g. | |
A concrete scene manager, derived from GUIEngine's AbastractSceneManager.
|
virtual |
implementing callback from base class AbstractStateManager
Implements GUIEngine::AbstractStateManager.
const PlayerProfile * StateManager::getActivePlayerProfile | ( | const int | id | ) |
id | the ID of the active player for whichyou want the profile |
|
virtual |
implementing callback from base class AbstractStateManager
Implements GUIEngine::AbstractStateManager.
|
virtual |
implementing callback from base class AbstractStateManager
Implements GUIEngine::AbstractStateManager.
|
virtual |
implementing callback from base class AbstractStateManager
Implements GUIEngine::AbstractStateManager.