Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5476 in orxonox.OLD for trunk/src/lib/event


Ignore:
Timestamp:
Nov 3, 2005, 2:27:25 PM (19 years ago)
Author:
patrick
Message:

orxonox/lib/event: also checked the other mouse buttons and removed the debug info

Location:
trunk/src/lib/event
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/event/event_handler.cc

    r5474 r5476  
    279279        case SDL_MOUSEBUTTONUP:
    280280          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;
    283282          break;
    284283        case SDL_MOUSEBUTTONDOWN:
    285284          ev.bPressed = true;
    286           ev.type = event.button.button + SDLK_LAST -1;
     285          ev.type = event.button.button + SDLK_LAST - 1;
    287286          break;
    288287        case SDL_JOYAXISMOTION:
  • trunk/src/lib/event/key_names.cc

    r5474 r5476  
    2525int buttonnameToSDLB(const char* name)
    2626{
    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;
    3332        return -1;
    3433}
     
    3736{
    3837        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";
    4342        return "UNKNOWN";
    4443}
Note: See TracChangeset for help on using the changeset viewer.