Can you show me a bit of code how you mean. I'm not really understanding. Is it something like:
Code:
class Button
{
private:
//The attributes of the button
SDL_Rect box;
//The part of the button sprite sheet that will be shown
SDL_Rect* clip;
public:
//Initialize the variables
Button( int x, int y, int w, int h );
//Handles events and set the button's sprite region
void handle_events();
//Shows the button on the screen
void show();
};
Like that from the LazyFoo tutorial? Or how do I do this. The only thing Í want to do is to say if the mouse is in position (On the start button) and the user has clicked the left mouse button the program should start the game.