Changeset 4361 in orxonox.OLD for orxonox/trunk
- Timestamp:
- May 28, 2005, 2:43:21 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/command_node.cc
r4326 r4361 271 271 cmd.bUp = true; 272 272 if( strlen (cmd.cmd) > 0) relay(&cmd); 273 printf("mouse activity: %i \n", event.key.keysym.sym ); 273 274 break; 274 275 case SDL_MOUSEBUTTONDOWN: -
orxonox/trunk/src/util/event/event.h
r4352 r4361 21 21 22 22 23 private:24 23 int offset; //!< offset in the event type array 25 24 char cmd[CMD_LENGHT]; //!< the command delivered … … 28 27 Uint16 x, y; //!< x and y coordinates 29 28 Sint16 xRel, yRel; //!< relative x and y movement to last point 30 31 29 }; 32 30 -
orxonox/trunk/src/util/event/event_handler.cc
r4355 r4361 18 18 #include "event_handler.h" 19 19 #include "event_listener.h" 20 #include "event.h" 20 21 21 22 #include "ini_parser.h" … … 213 214 SDL_Event event; 214 215 //Command cmd; 216 Event ev; 217 EventListener* listener; 215 218 while( SDL_PollEvent (&event)) 216 219 { 217 // memset (cmd.cmd, 0, CMD_LENGHT);220 //memset (ev.cmd, 0, CMD_LENGHT); 218 221 switch( event.type) 219 222 { 220 223 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(); 226 228 break; 227 229 case SDL_KEYUP:
Note: See TracChangeset
for help on using the changeset viewer.