SDL Mouse Clicks

Started by
0 comments, last by Mr_Ridd 20 years, 1 month ago
How do I know which mouse button was clicked? I know I can use SDL_MOUSEBUTTONDOWN, but that doesn''t give me the button.
The ability to succeed is the ability to adapt
Advertisement
SDL_GetMouseState()

Also, when processing events, when an SDL_event is handled and event.type==SDL_MOUSEBUTTONDOWN, then event.button.button will give which button was pressed (SDL_BUTTON_LEFT, SDL_BUTTON_MIDDLE, or SDL_BUTTON_RIGHT).

Golem
Blender--The Gimp--Python--Lua--SDL
Nethack--Crawl--ADOM--Angband--Dungeondweller

This topic is closed to new replies.

Advertisement