mirror of
https://github.com/glfw/glfw.git
synced 2025-06-07 16:24:57 +00:00
Add GLFW_MOUSE_BUTTON_LIMIT information to the input guide
This commit is contained in:
parent
912cb9dd31
commit
223caf09ea
@ -494,8 +494,15 @@ a mouse button callback.
|
|||||||
glfwSetMouseButtonCallback(window, mouse_button_callback);
|
glfwSetMouseButtonCallback(window, mouse_button_callback);
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
The callback function receives the [mouse button](@ref buttons), button action
|
To handle all mouse buttons, instead of only the [supported ones](@ref buttons),
|
||||||
and [modifier bits](@ref mods).
|
set the @ref GLFW_MOUSE_BUTTON_LIMIT initialization hint to `GLFW_FALSE`.
|
||||||
|
|
||||||
|
@code
|
||||||
|
glfwInitHint(GLFW_MOUSE_BUTTON_LIMIT, GLFW_FALSE);
|
||||||
|
@endcode
|
||||||
|
|
||||||
|
The callback function receives the mouse button, button action and
|
||||||
|
[modifier bits](@ref mods).
|
||||||
|
|
||||||
@code
|
@code
|
||||||
void mouse_button_callback(GLFWwindow* window, int button, int action, int mods)
|
void mouse_button_callback(GLFWwindow* window, int button, int action, int mods)
|
||||||
@ -505,6 +512,10 @@ void mouse_button_callback(GLFWwindow* window, int button, int action, int mods)
|
|||||||
}
|
}
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
|
The mouse button is an integer that can be one of the
|
||||||
|
[supported mouse buttons](@ref buttons) or, if @ref GLFW_MOUSE_BUTTON_LIMIT is
|
||||||
|
set to `GLFW_FALSE`, any other value.
|
||||||
|
|
||||||
The action is one of `GLFW_PRESS` or `GLFW_RELEASE`.
|
The action is one of `GLFW_PRESS` or `GLFW_RELEASE`.
|
||||||
|
|
||||||
The last reported state for every [supported mouse button](@ref buttons) is also
|
The last reported state for every [supported mouse button](@ref buttons) is also
|
||||||
|
Loading…
Reference in New Issue
Block a user