SFML community forums
Help => Window => Topic started by: bastien on November 03, 2010, 02:04:26 pm
-
The only way I found to get the cursor's coordinates at any time is to use Input::GetMouseX/Y. Is there anything more straightforward? Window has SetCursorPosition() apparently, but no GetCursorPosition(). Why?
-
You can get the cursor position if you handle events of type MouseMoved.
-
I might be totally wrong on this, but I thought that the windowing API used by SFML already had some function to cursor coordinates, and that sf::Input used that.
If that's the case, it would be more straightforward and less CPU-consuming to call that function instead of tracking the cursor manually.
-
sf::Input totally relies on events, it doesn't make any OS call.