Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

sfml mouse click

if (sf::Mouse::isButtonPressed(sf::Mouse::Left))
{
    // left click...
}
// get global mouse position
sf::Vector2i position = sf::Mouse::getPosition();
// set mouse position relative to a window
sf::Mouse::setPosition(sf::Vector2i(100, 200), window);
 
PREVIOUS NEXT
Tagged: #sfml #mouse #click
ADD COMMENT
Topic
Name
8+6 =