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) ;)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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                }
Note: See TracChangeset for help on using the changeset viewer.