how to get mouse position on window sfm; 1

how to get mouse position on window sfm;

sf::Vector2i position = sf::Mouse::getPosition(window);

// position will contain the x and y of your mouse

position.x >> 0
position.y >> 0

Here is what the above code is Doing:
1. We create a variable called position and set it equal to the position of the mouse.
2. We then set the x and y of the position variable to 0.
3. We then set the x and y of the position variable to 0.

Similar Posts