Using SFML, every event type will produce a large negative value for x and y of -858993460.
if (menuEvent.type == sf::Event::GainedFocus
|| menuEvent.type == sf::Event::LostFocus
|| menuEvent.type == sf::Event::KeyPressed
|| menuEvent.type == sf::Event::KeyReleased
|| menuEvent.type == sf::Event::MouseEntered
|| menuEvent.type == sf::Event::MouseMoved
|| menuEvent.type == sf::Event::MouseButtonReleased
|| menuEvent.type == sf::Event::MouseButtonPressed) {
return HandleFindExit(menuEvent.mouseButton.x, menuEvent.mouseButton.y);
// Except for when menuEvent.type is MouseButtonReleased
// or MouseButtonPressed x and y will be -858993460
}
I am wondering if this is an intended result or am I attempting to use these events incorrectly?
It seems to me there is a use case for knowing the position of the mouse cursor on MouseMoved, for example so you can have a button change to a different sprite as if you are hovering over it.