Hi! I'm a C++ programmer and I am using SDL 2.0. But I don't know how to handle mouse input. Do you think you can explain of how to do that? Or give me a link that explains that really great? (I'm sorry if this is a dumb question to post here)
I know how to handle a mouse button that presses down for a sec.
But not how to handle the mouse input of what the mouse is hovering over and that.Code:if (event.type == SDL_MOUSEBUTTONDOWN) { if (event.button.button == SDL_BUTTON_LEFT) { // Do something . . . } }
Like in a start menu of a game. I want a button for example to appear blue when I hover over it and when I click on it. It should start the game for example.
Please help!