Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 12, 2009, 11:08:50 PM (15 years ago)
Author:
rgrieder
Message:

Heavy clean up in the InputManager; not many real code changes though.
And temporary hack-fixed a problem in the Keybinder with std::vector.reserve(1000) ;)

Location:
code/branches/core4/src/orxonox/gamestates
Files:
3 edited

Legend:

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

    r3274 r3279  
    150150
    151151        // enable master input
    152         InputManager::getInstance().requestEnterState("master");
     152        InputManager::getInstance().enterState("master");
    153153    }
    154154
     
    170170
    171171        masterInputState_->setHandler(0);
    172         InputManager::getInstance().requestDestroyState("master");
     172        InputManager::getInstance().destroyState("master");
    173173        delete this->masterKeyBinder_;
    174174
  • code/branches/core4/src/orxonox/gamestates/GSLevel.cc

    r3274 r3279  
    134134
    135135            // level is loaded: we can start capturing the input
    136             InputManager::getInstance().requestEnterState("game");
     136            InputManager::getInstance().enterState("game");
    137137        }
    138138    }
     
    144144            GUIManager::getInstance().showGUI("inGameTest");
    145145            GUIManager::getInstance().executeCode("showCursor()");
    146             InputManager::getInstance().requestEnterState("guiMouseOnly");
     146            InputManager::getInstance().enterState("guiMouseOnly");
    147147        }
    148148        else
     
    150150            GUIManager::getInstance().executeCode("hideGUI(\"inGameTest\")");
    151151            GUIManager::getInstance().executeCode("hideCursor()");
    152             InputManager::getInstance().requestLeaveState("guiMouseOnly");
     152            InputManager::getInstance().leaveState("guiMouseOnly");
    153153        }
    154154    }
     
    178178
    179179        if (GameMode::showsGraphics())
    180             InputManager::getInstance().requestLeaveState("game");
     180            InputManager::getInstance().leaveState("game");
    181181
    182182        if (GameMode::isMaster())
     
    218218            guiMouseOnlyInputState_->setHandler(0);
    219219            guiKeysOnlyInputState_->setHandler(0);
    220             InputManager::getInstance().requestDestroyState("game");
     220            InputManager::getInstance().destroyState("game");
    221221            if (this->keyBinder_)
    222222            {
     
    286286                {
    287287                    COUT(0) << "Press any button/key or move a mouse/joystick axis" << std::endl;
    288                     InputManager::getInstance().requestEnterState("detector");
     288                    InputManager::getInstance().enterState("detector");
    289289                    bindingString = command;
    290290                    bTemporarySaved = bTemporary;
     
    301301                    COUT(0) << "Binding string \"" << bindingString << "\" on key '" << name << "'" << std::endl;
    302302                    this->keyBinder_->setBinding(bindingString, name, bTemporarySaved);
    303                     InputManager::getInstance().requestLeaveState("detector");
     303                    InputManager::getInstance().leaveState("detector");
    304304                    bound = true;
    305305                }
  • code/branches/core4/src/orxonox/gamestates/GSMainMenu.cc

    r3274 r3279  
    9696        }
    9797
    98         InputManager::getInstance().requestEnterState("mainMenu");
     98        InputManager::getInstance().enterState("mainMenu");
    9999
    100100        this->ambient_ = new SoundMainMenu();
     
    106106        delete this->ambient_;
    107107
    108         InputManager::getInstance().requestLeaveState("mainMenu");
    109         InputManager::getInstance().requestDestroyState("mainMenu");
     108        InputManager::getInstance().leaveState("mainMenu");
     109        InputManager::getInstance().destroyState("mainMenu");
    110110
    111111        GUIManager::getInstance().setCamera(0);
Note: See TracChangeset for help on using the changeset viewer.