Hello
I have made a custom mouse icon and I am using it through the methods -
Render_window_name.setMouseCursorVisible(false)
and
MouseSprite.setPosition(sf::Vector2f(sf::Mouse::getPosition(Render_window_name)));
I have also added a sound that is played everytime the user clicks the left button. Everything is smooth except that while I click the left button and hold it the sound keeps on playing. I want that it must be played only once when the left button is pressed, no matter for how much time I hold it.
How do I set up a sound using SFML so that it plays only once when the mouse is clicked.
Thanks