• Advertisement

Archived

This topic is now archived and is closed to further replies.

SDL Mouse Clicks

This topic is 5087 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do I know which mouse button was clicked? I know I can use SDL_MOUSEBUTTONDOWN, but that doesn''t give me the button.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement