Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 3, 2008, 1:26:48 PM (16 years ago)
Author:
rgrieder
Message:

Fixed two issues with input:

  • Buffer gets cleared now when the window focus changes
  • Added a configValue in the InGameConsole:

Until now the input was always transparent to the level when activating the console (exception keyboard input of course)
bHidesAllInput_ can change that setting (configured in orxonox.ini)

@Oli: Sorry, couldn't apply the patch in the network branch because of conflicts (I have already made some changes to the InputManager in the trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/core/input/ExtendedInputState.cc

    r1755 r1878  
    366366    void ExtendedInputState::removeAndDestroyAllHandlers()
    367367    {
    368         for (std::vector<InputTickable*>::iterator it = allHandlers_.begin();
     368        for (std::vector<InputHandler*>::iterator it = allHandlers_.begin();
    369369            it != allHandlers_.end(); ++it)
    370370            delete *it;
     
    387387        True if added, false if handler already existed.
    388388    */
    389     bool ExtendedInputState::addHandler(InputTickable* handler)
     389    bool ExtendedInputState::addHandler(InputHandler* handler)
    390390    {
    391391        bool success = false;
     
    406406        True if removal was successful, false if handler was not found.
    407407    */
    408     bool ExtendedInputState::removeHandler(InputTickable* handler)
     408    bool ExtendedInputState::removeHandler(InputHandler* handler)
    409409    {
    410410        bool success = false;
     
    449449    {
    450450        // we can use a set to have a list of unique pointers (an object can implement all 3 handlers)
    451         std::set<InputTickable*> tempSet;
     451        std::set<InputHandler*> tempSet;
    452452        for (unsigned int iHandler = 0; iHandler < keyHandlers_.size(); iHandler++)
    453453            tempSet.insert(keyHandlers_[iHandler]);
     
    460460        // copy the content of the map back to the actual vector
    461461        allHandlers_.clear();
    462         for (std::set<InputTickable*>::const_iterator itHandler = tempSet.begin();
     462        for (std::set<InputHandler*>::const_iterator itHandler = tempSet.begin();
    463463            itHandler != tempSet.end(); itHandler++)
    464464            allHandlers_.push_back(*itHandler);
     
    469469        for (unsigned int i = 0; i < joyStickHandlers_.size(); ++i)
    470470            setInputDeviceEnabled(2 + i, (joyStickHandlers_[i].size() != 0));
     471
     472        this->bHandlersChanged_ = true;
    471473    }
    472474}
Note: See TracChangeset for help on using the changeset viewer.