Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 28, 2009, 9:31:24 PM (15 years ago)
Author:
landauf
Message:

replaced most occurrences of setObject(o) in combination with createFunctor(f) with the more convenient createFunctor(f, o)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/modules/gamestates/GSMainMenu.cc

    r5817 r5829  
    7575        GraphicsManager::getInstance().setCamera(this->camera_);
    7676
    77         {
    78             FunctorMember<GSMainMenu>* functor = createFunctor(&GSMainMenu::startStandalone);
    79             functor->setObject(this);
    80             this->ccStartStandalone_ = createConsoleCommand(functor, "startGame");
    81             CommandExecutor::addConsoleCommandShortcut(this->ccStartStandalone_);
    82         }
    83         {
    84             FunctorMember<GSMainMenu>* functor = createFunctor(&GSMainMenu::startServer);
    85             functor->setObject(this);
    86             this->ccStartServer_ = createConsoleCommand(functor, "startServer");
    87             CommandExecutor::addConsoleCommandShortcut(this->ccStartServer_);
    88         }
    89         {
    90             FunctorMember<GSMainMenu>* functor = createFunctor(&GSMainMenu::startClient);
    91             functor->setObject(this);
    92             this->ccStartClient_ = createConsoleCommand(functor, "startClient");
    93             CommandExecutor::addConsoleCommandShortcut(this->ccStartClient_);
    94         }
    95         {
    96             FunctorMember<GSMainMenu>* functor = createFunctor(&GSMainMenu::startDedicated);
    97             functor->setObject(this);
    98             this->ccStartDedicated_ = createConsoleCommand(functor, "startDedicated");
    99             CommandExecutor::addConsoleCommandShortcut(this->ccStartDedicated_);
    100         }
    101         {
    102             FunctorMember<GSMainMenu>* functor = createFunctor(&GSMainMenu::startMainMenu);
    103             functor->setObject(this);
    104             this->ccStartMainMenu_ = createConsoleCommand(functor, "startMainMenu");
    105             CommandExecutor::addConsoleCommandShortcut(this->ccStartMainMenu_);
    106         }
     77        this->ccStartStandalone_ = createConsoleCommand(createFunctor(&GSMainMenu::startStandalone, this), "startGame");
     78        CommandExecutor::addConsoleCommandShortcut(this->ccStartStandalone_);
     79        this->ccStartServer_ = createConsoleCommand(createFunctor(&GSMainMenu::startServer, this), "startServer");
     80        CommandExecutor::addConsoleCommandShortcut(this->ccStartServer_);
     81        this->ccStartClient_ = createConsoleCommand(createFunctor(&GSMainMenu::startClient, this), "startClient");
     82        CommandExecutor::addConsoleCommandShortcut(this->ccStartClient_);
     83        this->ccStartDedicated_ = createConsoleCommand(createFunctor(&GSMainMenu::startDedicated, this), "startDedicated");
     84        CommandExecutor::addConsoleCommandShortcut(this->ccStartDedicated_);
     85        this->ccStartMainMenu_ = createConsoleCommand(createFunctor(&GSMainMenu::startMainMenu, this), "startMainMenu");
     86        CommandExecutor::addConsoleCommandShortcut(this->ccStartMainMenu_);
    10787
    10888        InputManager::getInstance().enterState("mainMenu");
Note: See TracChangeset for help on using the changeset viewer.