Hi, currently i display the position of a sprite in the titlebar for monitoring purposewith this code:
sf::Vector2f positioncurseur = curseur.getPosition();
std::string cursx = std::to_string ( positioncurseur.x );
std::string cursy = std::to_string ( positioncurseur.y );
title += cursx;
title += " ";
title += cursy;
It works well and give me this :
It annoy me since it is for a t-rpg with a grid so no decimals are needed.
Is it possible to remove the zeroes and the dot without too many lines of code ?