Added set_cursor_position and hide_cursor functions #198
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, I am trying to develop a simple 3d first person shooter game, and I need these two functions.
The problem:
I cannot use the
set_cursor_grab
on its own, because if the mouse is already on a edge of the window (e.g. 0-300), and I move the mouse left, theWindowEvent::CursorPos
will still return 0-300 so i canont detect the fact that the user is trying to move the mouse left (am I wrong?).Using
set_cursor_position
in conjunction withset_cursor_grab
solves the problem as I'm now able to center the mouse.