Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5964 in orxonox.OLD for branches/spaceshipcontrol/src/lib


Ignore:
Timestamp:
Dec 7, 2005, 3:43:01 PM (18 years ago)
Author:
bknecht
Message:

Mousecontrol implemented! Mousesensitivity implemented! Mouse is grabbed! Control works fine

Location:
branches/spaceshipcontrol/src/lib/event
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/spaceshipcontrol/src/lib/event/event_handler.cc

    r5786 r5964  
    4747  this->flush(ES_ALL);
    4848  this->withUNICODE(false);
     49  this->grabEvents(false);
    4950
    5051  this->state = ES_GAME;
     
    255256}
    256257
     258void EventHandler::grabEvents(bool grabEvents)
     259{
     260     this->eventsGrabbed = grabEvents;
     261     if(!grabEvents)
     262      SDL_WM_GrabInput(SDL_GRAB_OFF);
     263     else
     264      SDL_WM_GrabInput(SDL_GRAB_ON);
     265}
    257266
    258267/**
  • branches/spaceshipcontrol/src/lib/event/event_handler.h

    r5786 r5964  
    4343
    4444  void withUNICODE(bool enableUNICODE);
     45  void grabEvents(bool grabEvents);
    4546
    4647  void process();
     
    6263
    6364  bool                       bUNICODE;                        //!< If unicode should be enabled.
     65  bool                       eventsGrabbed;                   //!< If the events should be grabbed
    6466};
    6567
Note: See TracChangeset for help on using the changeset viewer.