SDL Mouse Click
<p>So, I'm currently working on an options menu for my game, I have a button that when pressed it changes it's text to the next resolution in an array, so basically the user presses this button to change their resolution to the next string in the array.</p>

<p>My problem is getting the click event.</p>

<p>Right now, when the user presses the button, it returns true while the mouse is down, instead of when the mouse is pressed. I want to only return true in the mouse event when the mouse is pressed.</p>

<p>I've looked around, and everything I've found seems to be similar to what I've done or, as I said, returning true while the mouse is down, instead of the initial click.</p>

<p>My events are handled in a EventManager singleton, and here are the functions that I see as necessary:</p>

<p>My update function, this is where the event is polled, it is worth noting I'm using a private SDL_Event named "e".</p>

<pre><code>void EventManager::update(){
    while(SDL_PollEvent(&amp;e)){
        SDL_GetMouseState(&amp;mouseX, &amp;mouseY);
        switch(e.type){
            case SDL_QUIT:
                running = false;

        }
    }
}
</code></pre>

<p>My mousePress function, where I want a mouse press returned.</p>

<pre><code>int EventManager::mousePress(){
    if(e.type == SDL_MOUSEBUTTONDOWN){
        return e.button.button;
    }
    return 0;
}
</code></pre>