IMHO it would be better if it returns sf::Vector2u, because then we'll be able to simply do this:
I mean - operators would work, and this way is much more convenient.
Here is an example from my tower defense: I'm putting a callback at some object, and after this I want to put turret in a place where mouse cursor occur. Since callback.mouse returns only local bounds from the object where callback was sent, I have to add some coordinates to make sure that turret will be in a correct place.
What do you think, texus?
Code (cpp) Select
object.setPosition(object2.getPosition() + callback.mouse);
I mean - operators would work, and this way is much more convenient.
Here is an example from my tower defense: I'm putting a callback at some object, and after this I want to put turret in a place where mouse cursor occur. Since callback.mouse returns only local bounds from the object where callback was sent, I have to add some coordinates to make sure that turret will be in a correct place.
What do you think, texus?