Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 31, 2009, 2:14:09 PM (15 years ago)
Author:
bknecht
Message:

(Doxygen) Documentation added for GUIManager and some GameState classes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui/src/orxonox/gamestates/GSGraphics.cc

    r2869 r2875  
    2323 *      Reto Grieder
    2424 *   Co-authors:
    25  *      ...
    26  *
     25 *      Benjamin Knecht
     26 *
     27 */
     28
     29/**
     30    @file
     31    @brief Implementation of Graphics GameState class.
    2732 */
    2833
     
    7176    }
    7277
     78    /**
     79    @brief
     80        this function does nothing
     81
     82        Indeed. Here goes nothing.
     83    */
    7384    void GSGraphics::setConfigValues()
    7485    {
    7586    }
    7687
     88    /**
     89    @brief
     90        This function is called when we enter this game state.
     91
     92        Since graphics is very important for our game this function does quite a lot:
     93        \li starts graphics manager
     94        \li loads debug overlay
     95        \li manages render window
     96        \li creates input manager
     97        \li loads master key bindings
     98        \li loads ingame console
     99        \li loads GUI interface (GUIManager)
     100        \li creates console command to toggle GUI
     101    */
    77102    void GSGraphics::activate()
    78103    {
     
    90115        Loader::open(debugOverlay_);
    91116
    92         // Calls the InputManager which sets up the input devices.
    93117        // The render window width and height are used to set up the mouse movement.
    94         inputManager_ = new InputManager();
    95118        size_t windowHnd = 0;
    96119        Ogre::RenderWindow* renderWindow = GraphicsManager::getInstance().getRenderWindow();
    97120        renderWindow->getCustomAttribute("WINDOW", &windowHnd);
     121
     122        // Calls the InputManager which sets up the input devices.
     123        inputManager_ = new InputManager();
    98124        inputManager_->initialise(windowHnd, renderWindow->getWidth(), renderWindow->getHeight(), true);
    99125
     126        // load master key bindings
    100127        masterInputState_ = InputManager::getInstance().createInputState<SimpleInputState>("master", true);
    101128        masterKeyBinder_ = new KeyBinder();
     
    111138        guiManager_->initialise(renderWindow);
    112139
     140        // add console command to toggle GUI
    113141        FunctorMember<GSGraphics>* functor = createFunctor(&GSGraphics::toggleGUI);
    114142        functor->setObject(this);
     
    116144        CommandExecutor::addConsoleCommandShortcut(this->ccToggleGUI_);
    117145
    118 
     146        // enable master input
    119147        InputManager::getInstance().requestEnterState("master");
    120148    }
    121149
     150    /**
     151    @brief
     152        This function is called when the game state is left
     153
     154        Created references, input states and console commands are deleted.
     155    */
    122156    void GSGraphics::deactivate()
    123157    {
     
    147181    }
    148182
     183    /**
     184    @brief
     185        Toggles the visibility of the current GUI
     186
     187        This function just executes a Lua function in the main script of the GUI by accessing the GUIManager.
     188        For more details on this function check out the Lua code.
     189    */
    149190    void GSGraphics::toggleGUI()
    150191    {
Note: See TracChangeset for help on using the changeset viewer.