mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-02 01:47:41 +00:00
Renamed SDL_Get/SetRelativeMouseMode to SDL_Get/SetWindowRelativeMouseMode()
Fixes https://github.com/libsdl-org/SDL/issues/10041
This commit is contained in:
parent
e612ce511b
commit
57f9c6f7bb
15 changed files with 190 additions and 115 deletions
|
@ -288,23 +288,36 @@ extern SDL_DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window,
|
|||
extern SDL_DECLSPEC int SDLCALL SDL_WarpMouseGlobal(float x, float y);
|
||||
|
||||
/**
|
||||
* Set relative mouse mode.
|
||||
* Set relative mouse mode for a window.
|
||||
*
|
||||
* While the mouse is in relative mode, the cursor is hidden, the mouse
|
||||
* While the window has focus and relative mouse mode is enabled, the cursor is hidden, the mouse
|
||||
* position is constrained to the window, and SDL will report continuous
|
||||
* relative mouse motion even if the mouse is at the edge of the window.
|
||||
*
|
||||
* This function will flush any pending mouse motion.
|
||||
* This function will flush any pending mouse motion for this window.
|
||||
*
|
||||
* \param window the window to change.
|
||||
* \param enabled SDL_TRUE to enable relative mode, SDL_FALSE to disable.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetRelativeMouseMode
|
||||
* \sa SDL_GetWindowRelativeMouseMode
|
||||
*/
|
||||
extern SDL_DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
|
||||
extern SDL_DECLSPEC int SDLCALL SDL_SetWindowRelativeMouseMode(SDL_Window *window, SDL_bool enabled);
|
||||
|
||||
/**
|
||||
* Query whether relative mouse mode is enabled for a window.
|
||||
*
|
||||
* \param window the window to query.
|
||||
* \returns SDL_TRUE if relative mode is enabled for a window or SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_SetWindowRelativeMouseMode
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GetWindowRelativeMouseMode(SDL_Window *window);
|
||||
|
||||
/**
|
||||
* Capture the mouse and to track input outside an SDL window.
|
||||
|
@ -321,7 +334,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
|
|||
* mouse while the user is dragging something, until the user releases a mouse
|
||||
* button. It is not recommended that you capture the mouse for long periods
|
||||
* of time, such as the entire time your app is running. For that, you should
|
||||
* probably use SDL_SetRelativeMouseMode() or SDL_SetWindowMouseGrab(),
|
||||
* probably use SDL_SetWindowRelativeMouseMode() or SDL_SetWindowMouseGrab(),
|
||||
* depending on your goals.
|
||||
*
|
||||
* While captured, mouse events still report coordinates relative to the
|
||||
|
@ -352,17 +365,6 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
|
|||
*/
|
||||
extern SDL_DECLSPEC int SDLCALL SDL_CaptureMouse(SDL_bool enabled);
|
||||
|
||||
/**
|
||||
* Query whether relative mouse mode is enabled.
|
||||
*
|
||||
* \returns SDL_TRUE if relative mode is enabled or SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_SetRelativeMouseMode
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void);
|
||||
|
||||
/**
|
||||
* Create a cursor using the specified bitmap data and mask (in MSB format).
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue