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.

Location:
code/branches/gui/src/orxonox/gamestates
Files:
4 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    {
  • code/branches/gui/src/orxonox/gamestates/GSGraphics.h

    r2869 r2875  
    2323 *      Reto Grieder
    2424 *   Co-authors:
    25  *      ...
     25 *      Benjamin Knecht (documentation)
    2626 *
    2727 */
     28
     29 /**
     30    @file
     31    @brief Declaration of the Graphics GameState class.
     32  */
    2833
    2934#ifndef _GSGraphics_H__
     
    3641namespace orxonox
    3742{
     43    /**
     44    @class GSGraphics
     45    @brief
     46        Game state used when displaying graphics of any kind
     47
     48        This game state is only left out if we start a dedicated server where no graphics are present.
     49    */
    3850    class _OrxonoxExport GSGraphics : public GameState, public WindowEventListener
    3951    {
     
    5567
    5668        // managed singletons
    57         InputManager*         inputManager_;
     69        InputManager*         inputManager_;        //!< Reference to input management
    5870        InGameConsole*        console_;
    59         GUIManager*           guiManager_;
    60         GraphicsManager*      graphicsManager_;       //!< Interface to Ogre
     71        GUIManager*           guiManager_;          //!< Interface to GUI
     72        GraphicsManager*      graphicsManager_;     //!< Interface to Ogre
    6173
    62         KeyBinder*            masterKeyBinder_;
    63         SimpleInputState*     masterInputState_;
     74        KeyBinder*            masterKeyBinder_;     //!< Key binder for master key bindings
     75        SimpleInputState*     masterInputState_;    //!< Special input state for master input
    6476        XMLFile*              debugOverlay_;
    65         ConsoleCommand*       ccToggleGUI_;
     77        ConsoleCommand*       ccToggleGUI_;         //!< Console command to toggle GUI
    6678    };
    6779}
  • code/branches/gui/src/orxonox/gamestates/GSLevel.cc

    r2869 r2875  
    2424 *   Co-authors:
    2525 *      Fabian 'x3n' Landau
     26 *      Benjamin Knecht
    2627 *
    2728 */
     
    5657
    5758    SetCommandLineArgument(level, "presentation.oxw").shortcut("l");
    58     SetConsoleCommand(GSLevel, showIngameGUI, true).keybindMode(KeybindMode::OnPress).keybindMode(KeybindMode::OnRelease);
     59    SetConsoleCommand(GSLevel, showIngameGUI, true);
    5960
    6061    GSLevel::GSLevel(const std::string& name)
  • code/branches/gui/src/orxonox/gamestates/GSLevel.h

    r2869 r2875  
    2323 *      Reto Grieder
    2424 *   Co-authors:
    25  *      ...
     25 *      Benjamin Knecht
    2626 *
    2727 */
     
    6464        Radar*                radar_;                   //!< represents the Radar (not the HUD part)
    6565        XMLFile*              startFile_;               //!< current hard coded default level
    66         CameraManager*        cameraManager_;
    67         LevelManager*         levelManager_;
    68         PlayerManager*        playerManager_;
     66        CameraManager*        cameraManager_;           //!< camera manager for this level
     67        LevelManager*         levelManager_;            //!< global level manager
     68        PlayerManager*        playerManager_;           //!< player manager for this level
    6969
    7070        //##### ConfigValues #####
Note: See TracChangeset for help on using the changeset viewer.