51 return isHovered(obj.getGlobalBounds(), window);
81 return isClicked(obj.getGlobalBounds(), window);
Static helpers for mouse hit-testing against framework objects.
static bool isClicked(const sf::FloatRect &bounds, const sf::RenderWindow &window)
Return true if the left mouse button is held over a rect.
static bool isHovered(const sf::FloatRect &bounds, const sf::RenderWindow &window)
Return true if the mouse is currently over a rect.
static bool isHovered(const T &obj, const sf::RenderWindow &window)
Return true if the mouse is currently over a framework object.
static bool isClicked(const T &obj, const sf::RenderWindow &window)
Return true if the left mouse button is held over a framework object.