Sign in to follow this  

SDL Mouse_events

Recommended Posts

Hi, up till now i have been using the commands SDL_GetMouseState(x,y); to get the position where the user pressed and then given long lines of code specifying of how far x must be and y must be and then what happens. My question is is there any way for me, with some line of code, if the user has pressed on a SDL surface, and if yes then something happens, it would make my code much shorter an more simply viewable. thx :)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this