SuperTuxKart
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
StateManager Class Reference

A concrete scene manager, derived from GUIEngine's AbastractSceneManager. More...

#include <state_manager.hpp>

Inheritance diagram for StateManager:
Inheritance graph
[legend]

Classes

class  ActivePlayer
 Represents a player that is currently playing. More...
 

Public Member Functions

const PtrVector< ActivePlayer, HOLD > & getActivePlayers ()
 
ActivePlayergetActivePlayer (const int id)
 
const PlayerProfilegetActivePlayerProfile (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. More...
 
void popMenu ()
 removes the menu at the top of the screens stack If the stack becomes empty after performing the pop (i.e. More...
 
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. More...
 
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. More...
 
GameState getGameState ()
 
void reshowTopMostMenu ()
 to be called after e.g. More...
 
template<typename T >
void hardResetAndGoToScreen ()
 
unsigned int getMenuStackSize () const
 Returns the number of screens on the stack. More...
 

Static Public Member Functions

static StateManagerget ()
 
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
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. More...
 

Detailed Description

A concrete scene manager, derived from GUIEngine's AbastractSceneManager.

Member Function Documentation

◆ getActivePlayerProfile()

const PlayerProfile * StateManager::getActivePlayerProfile ( const int  id)
Returns
the PlayerProfile of a given ActivePlayer.
Parameters
idthe ID of the active player for whichyou want the profile

The documentation for this class was generated from the following files: