bool MouseOver(sf::Sprite &Sprite)//returns true if the mouse is over given sf::Sprite
{
float XPos = Sprite.GetPosition().x;//the x position
float YPos = Sprite.GetPosition().y;//the y position
float XSize = Sprite.GetSize().x;//the width
float YSize = Sprite.GetSize().y;//the height
if(MouseX >= XPos && MouseX <= XPos+XSize && MouseY >= YPos && MouseY <= YPos+YSize)
return true;
else
return false;
}