#include <src/orxonox/gamestates/GSGraphics.h>
Public Member Functions | |
void | activate () |
This function is called when we enter this game state. | |
void | deactivate () |
This function is called when the game state is left. | |
GSGraphics (const GameStateConstrParams ¶ms) | |
void | setConfigValues () |
this function does nothing | |
void | toggleGUI () |
Toggles the visibility of the current GUI. | |
void | update (const Clock &time) |
~GSGraphics () | |
Private Member Functions | |
void | windowFocusChanged () |
Window focus has changed. | |
void | windowResized (unsigned int newWidth, unsigned int newHeight) |
Window has resized. | |
Private Attributes | |
ConsoleCommand * | ccToggleGUI_ |
Console command to toggle GUI. | |
InGameConsole * | console_ |
XMLFile * | debugOverlay_ |
GraphicsManager * | graphicsManager_ |
Interface to Ogre. | |
GUIManager * | guiManager_ |
Interface to GUI. | |
InputManager * | inputManager_ |
Reference to input management. | |
SimpleInputState * | masterInputState_ |
Special input state for master input. | |
KeyBinder * | masterKeyBinder_ |
Key binder for master key bindings. | |
SoundManager * | soundManager_ |
Keeps track of SoundBase objects. |
This game state is only left out if we start a dedicated server where no graphics are present.
orxonox::GSGraphics::GSGraphics | ( | const GameStateConstrParams & | params | ) |
References RegisterRootObject.
orxonox::GSGraphics::~GSGraphics | ( | ) |
void orxonox::GSGraphics::activate | ( | ) | [virtual] |
This function is called when we enter this game state.
Since graphics is very important for our game this function does quite a lot:
Reimplemented from orxonox::GameState.
References orxonox::CommandExecutor::addConsoleCommandShortcut(), ccToggleGUI_, console_, COUT, orxonox::createConsoleCommand(), orxonox::InputManager::createInputState(), debugOverlay_, orxonox::InputManager::getInstance(), orxonox::GraphicsManager::getInstance(), orxonox::Core::getMediaPath(), orxonox::GraphicsManager::getRenderWindow(), graphicsManager_, guiManager_, orxonox::GUIManager::initialise(), orxonox::InGameConsole::initialise(), orxonox::InputManager::initialise(), inputManager_, masterInputState_, masterKeyBinder_, orxonox::Loader::open(), orxonox::InputManager::requestEnterState(), setConfigValues(), orxonox::SimpleInputState::setKeyHandler(), orxonox::FunctorMember< T >::setObject(), orxonox::GameMode::setShowsGraphics(), soundManager_, and toggleGUI().
void orxonox::GSGraphics::deactivate | ( | ) | [virtual] |
This function is called when the game state is left.
Created references, input states and console commands are deleted.
Reimplemented from orxonox::GameState.
References console_, debugOverlay_, orxonox::InputManager::getInstance(), graphicsManager_, guiManager_, inputManager_, masterInputState_, masterKeyBinder_, orxonox::InputManager::requestDestroyState(), orxonox::SimpleInputState::setHandler(), orxonox::GameMode::setShowsGraphics(), soundManager_, and orxonox::Loader::unload().
void orxonox::GSGraphics::setConfigValues | ( | ) |
this function does nothing
Indeed. Here goes nothing.
Reimplemented from orxonox::OrxonoxClass.
Referenced by activate().
void orxonox::GSGraphics::toggleGUI | ( | ) |
Toggles the visibility of the current GUI.
This function just executes a Lua function in the main script of the GUI by accessing the GUIManager. For more details on this function check out the Lua code.
References orxonox::GUIManager::executeCode(), and orxonox::GUIManager::getInstance().
Referenced by activate().
void orxonox::GSGraphics::update | ( | const Clock & | time | ) | [virtual] |
Reimplemented from orxonox::GameState.
References orxonox::Game::addTickTime(), console_, orxonox::GameState::getActivity(), orxonox::Game::getInstance(), orxonox::Clock::getRealMicroseconds(), graphicsManager_, guiManager_, inputManager_, orxonox::Game::requestState(), orxonox::GraphicsManager::update(), orxonox::GUIManager::update(), orxonox::InGameConsole::update(), and orxonox::InputManager::update().
void orxonox::GSGraphics::windowFocusChanged | ( | ) | [private, virtual] |
Window focus has changed.
rw | The render window it occured in |
Reimplemented from orxonox::WindowEventListener.
References orxonox::InputManager::clearBuffers(), and inputManager_.
void orxonox::GSGraphics::windowResized | ( | unsigned int | newWidth, | |
unsigned int | newHeight | |||
) | [private, virtual] |
Window has resized.
rw | The render window it occured in |
Reimplemented from orxonox::WindowEventListener.
References inputManager_, and orxonox::InputManager::setWindowExtents().
ConsoleCommand* orxonox::GSGraphics::ccToggleGUI_ [private] |
InGameConsole* orxonox::GSGraphics::console_ [private] |
Referenced by activate(), deactivate(), and update().
XMLFile* orxonox::GSGraphics::debugOverlay_ [private] |
Referenced by activate(), and deactivate().
GUIManager* orxonox::GSGraphics::guiManager_ [private] |
InputManager* orxonox::GSGraphics::inputManager_ [private] |
Reference to input management.
Referenced by activate(), deactivate(), update(), windowFocusChanged(), and windowResized().
KeyBinder* orxonox::GSGraphics::masterKeyBinder_ [private] |
SoundManager* orxonox::GSGraphics::soundManager_ [private] |