Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7858 in orxonox.OLD for trunk/src/lib/shell


Ignore:
Timestamp:
May 25, 2006, 3:59:34 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: fixed auto-repeat

Location:
trunk/src/lib/shell
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/shell/shell_input.cc

    r7771 r7858  
    334334        this->addCharacter(event.x);
    335335        this->pressedKey = event.x;
     336        this->pressedEvent = event.type;
    336337      }
    337338      this->delayed = this->repeatDelay;
     
    339340    else // if(!event.bPressed)
    340341    {
    341       if (this->pressedKey == event.x || this->pressedKey == event.type)
    342       {
     342      if (this->pressedEvent == event.type)
     343      {
     344        this->pressedEvent = 0;
    343345        this->pressedKey = 0;
    344346        this->delayed = 0.0;
  • trunk/src/lib/shell/shell_input.h

    r7729 r7858  
    6868    float                             delayed;          //!< how much of the delay is remaining.
    6969    Uint16                            pressedKey;       //!< the pressed key that will be repeated.
     70    Uint16                            pressedEvent;     //!< The Event, that lead to the pressing of the Key.
    7071
    7172    static std::list<std::string>     history;          //!< The history of given commands.
Note: See TracChangeset for help on using the changeset viewer.