MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / getMouseButtonFromEvent

Function getMouseButtonFromEvent

platform/sdl/knativeinputSDL.cpp:493–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

491}
492
493static int getMouseButtonFromEvent(SDL_Event* e) {
494 if (e->button.button == SDL_BUTTON_LEFT) {
495 return 0;
496 } else if (e->button.button == SDL_BUTTON_MIDDLE) {
497 return 2;
498 } else if (e->button.button == SDL_BUTTON_RIGHT) {
499 return 1;
500 }
501 return 0;
502}
503
504// return true to continue processing for custom handlers
505//

Callers 2

processCustomEventsMethod · 0.85
handlSdlEventMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected