Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 26, 2010, 12:09:12 AM (14 years ago)
Author:
landauf
Message:

adapted all console commands to the new interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/consolecommands3/src/libraries/core/GraphicsManager.cc

    r7204 r7219  
    6565namespace orxonox
    6666{
     67    static const std::string __CC_printScreen_name = "printScreen";
     68    _DeclareConsoleCommand(__CC_printScreen_name, &prototype::void__void);
     69
    6770    class OgreWindowEventListener : public Ogre::WindowEventListener
    6871    {
     
    131134
    132135        Ogre::WindowEventUtilities::removeWindowEventListener(renderWindow_, ogreWindowEventListener_.get());
    133         // TODO: Destroy the console command
     136        _ModifyConsoleCommand(__CC_printScreen_name).resetFunction();
    134137
    135138        // Undeclare the resources
     
    321324
    322325        // add console commands
    323         ccPrintScreen_ = createConsoleCommand(createFunctor(&GraphicsManager::printScreen, this), "printScreen");
    324         CommandExecutor::addConsoleCommandShortcut(ccPrintScreen_);
     326        _ModifyConsoleCommand(__CC_printScreen_name).setFunction(&GraphicsManager::printScreen, this);
    325327    }
    326328
Note: See TracChangeset for help on using the changeset viewer.