Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5128 in orxonox.OLD for trunk


Ignore:
Timestamp:
Aug 25, 2005, 4:02:31 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: now it is also possible to write out Uppercase

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/shell.cc

    r5127 r5128  
    503503    else if (likely(event.type < 127))
    504504    {
     505      Uint8 *keystate = SDL_GetKeyState(NULL);
    505506      this->delayed = this->repeatDelay;
    506       this->pressedKey = event.type;
    507       this->addCharacter(event.type);
     507      if (unlikely( keystate[SDLK_LSHIFT] || keystate[SDLK_RSHIFT] ))
     508      {
     509        this->pressedKey = event.type-32;
     510        this->addCharacter(event.type-32);
     511      }
     512      else
     513      {
     514        this->pressedKey = event.type;
     515        this->addCharacter(event.type);
     516      }
    508517    }
    509518  }
    510519  else // if(!event.bPressed)
    511520  {
    512     if (this->pressedKey == event.type)
     521    if (this->pressedKey == event.type || (this->pressedKey == event.type - 32))
    513522    {
    514523      this->pressedKey = SDLK_FIRST;
Note: See TracChangeset for help on using the changeset viewer.