SFML community forums
Help => Window => Topic started by: pwnstar23 on January 11, 2013, 08:41:11 am
-
I found that Mouse::getPosition() returns window space, you can subtract window.getPosition() but its off by the boarders of the window I think. How to get this right?
-
So you need Mouse::getPosition(window) (read the doc and tutorials please).
-
Yea thank you. I was doing a search and found that. Seems like it would be useful if you had a method on window class to get the client rect, for other programming problems.
-
for other programming problems
Such as...?
The client rect is useful only if you have desktop coordinates. The only function that returns desktop coordinates is Mouse::getPosition(), and it already has an overload to get client coordinates. So I don't think that such a function would be useful at all.