SDL Mouse Clicks
How do I know which mouse button was clicked? I know I can use SDL_MOUSEBUTTONDOWN, but that doesn''t give me the button.
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
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
Popular Topics
Advertisement