Changeset 5476 in orxonox.OLD for trunk/src/lib/event
- Timestamp:
- Nov 3, 2005, 2:27:25 PM (19 years ago)
- Location:
- trunk/src/lib/event
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/event/event_handler.cc
r5474 r5476 279 279 case SDL_MOUSEBUTTONUP: 280 280 ev.bPressed = false; 281 ev.type = event.button.button + SDLK_LAST -1; 282 printf(">>>>>>>>>>type = %i\n", ev.type); 281 ev.type = event.button.button + SDLK_LAST - 1; 283 282 break; 284 283 case SDL_MOUSEBUTTONDOWN: 285 284 ev.bPressed = true; 286 ev.type = event.button.button + SDLK_LAST - 1;285 ev.type = event.button.button + SDLK_LAST - 1; 287 286 break; 288 287 case SDL_JOYAXISMOTION: -
trunk/src/lib/event/key_names.cc
r5474 r5476 25 25 int buttonnameToSDLB(const char* name) 26 26 { 27 if( !strcmp (name, "BUTTON_LEFT")) 28 return EV_MOUSE_BUTTON_LEFT; 29 if( !strcmp (name, "BUTTON_MIDDLE")) return SDL_BUTTON_MIDDLE; 30 if( !strcmp (name, "BUTTON_RIGHT")) return SDL_BUTTON_RIGHT; 31 if( !strcmp (name, "BUTTON_WHEELUP")) return SDL_BUTTON_WHEELUP; 32 if( !strcmp (name, "BUTTON_WHEELDOWN")) return SDL_BUTTON_WHEELDOWN; 27 if( !strcmp (name, "BUTTON_LEFT")) return EV_MOUSE_BUTTON_LEFT; 28 if( !strcmp (name, "BUTTON_MIDDLE")) return EV_MOUSE_BUTTON_MIDDLE; 29 if( !strcmp (name, "BUTTON_RIGHT")) return EV_MOUSE_BUTTON_RIGHT; 30 if( !strcmp (name, "BUTTON_WHEELUP")) return EV_MOUSE_BUTTON_WHEELUP; 31 if( !strcmp (name, "BUTTON_WHEELDOWN")) return EV_MOUSE_BUTTON_WHEELDOWN; 33 32 return -1; 34 33 } … … 37 36 { 38 37 if( button == EV_MOUSE_BUTTON_LEFT) return "BUTTON_LEFT"; 39 if( button == SDL_BUTTON_MIDDLE) return "BUTTON_MIDDLE";40 if( button == SDL_BUTTON_RIGHT) return "BUTTON_RIGHT";41 if( button == SDL_BUTTON_WHEELUP) return "BUTTON_WHEELUP";42 if( button == SDL_BUTTON_WHEELDOWN) return "BUTTON_WHEELDOWN";38 if( button == EV_MOUSE_BUTTON_MIDDLE) return "BUTTON_MIDDLE"; 39 if( button == EV_MOUSE_BUTTON_RIGHT) return "BUTTON_RIGHT"; 40 if( button == EV_MOUSE_BUTTON_WHEELUP) return "BUTTON_WHEELUP"; 41 if( button == EV_MOUSE_BUTTON_WHEELDOWN) return "BUTTON_WHEELDOWN"; 43 42 return "UNKNOWN"; 44 43 }
Note: See TracChangeset
for help on using the changeset viewer.