Function tetra::window::is_relative_mouse_mode[][src]

pub fn is_relative_mouse_mode(ctx: &Context) -> bool

Returns whether or not relative mouse mode is currently enabled.

While the mouse is in relative mode, the cursor is hidden and can move beyond the bounds of the window. The delta field of Event::MouseMoved can then be used to track the cursor’s changes in position. This is useful when implementing control schemes that require the mouse to be able to move infinitely in any direction (for example, FPS-style movement).

While this mode is enabled, the absolute position of the mouse may not be updated - as such, you should not rely on it.