Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4361 in orxonox.OLD for orxonox/trunk/src/util/event


Ignore:
Timestamp:
May 28, 2005, 2:43:21 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: event handler ongoing work, started implementing the precess funciton

Location:
orxonox/trunk/src/util/event
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/event/event.h

    r4352 r4361  
    2121
    2222
    23  private:
    2423  int offset;                      //!< offset in the event type array
    2524  char cmd[CMD_LENGHT];            //!< the command delivered
     
    2827  Uint16 x, y;                     //!< x and y coordinates
    2928  Sint16 xRel, yRel;               //!< relative x and y movement to last point
    30 
    3129};
    3230
  • orxonox/trunk/src/util/event/event_handler.cc

    r4355 r4361  
    1818#include "event_handler.h"
    1919#include "event_listener.h"
     20#include "event.h"
    2021
    2122#include "ini_parser.h"
     
    213214  SDL_Event event;
    214215  //Command cmd;
     216  Event ev;
     217  EventListener* listener;
    215218  while( SDL_PollEvent (&event))
    216219    {
    217       //  memset (cmd.cmd, 0, CMD_LENGHT);
     220      //memset (ev.cmd, 0, CMD_LENGHT);
    218221      switch( event.type)
    219222        {
    220223        case SDL_KEYDOWN:
    221           /*
    222           strcpy (cmd.cmd, aliases->keys[event.key.keysym.sym]);
    223           cmd.bUp = false;
    224           if( strlen (cmd.cmd) > 0) relay(&cmd);
    225           */
     224          ev.bPressed = true;
     225          listener = this->listeners[this->state][event.key.keysym.sym];
     226          //if( listener != NULL)
     227            //listener->process();
    226228          break;
    227229        case SDL_KEYUP:
Note: See TracChangeset for help on using the changeset viewer.