mirror of
https://github.com/glfw/glfw.git
synced 2026-09-20 16:30:45 +00:00
Add GLFW_HOVERED for polling cursor hover state
This window attribute corresponds to the cursor enter/leave callback. Fixes #1166.
This commit is contained in:
@@ -419,6 +419,16 @@ void cursor_enter_callback(GLFWwindow* window, int entered)
|
||||
}
|
||||
@endcode
|
||||
|
||||
You can query whether the cursor is currently inside the client area of the
|
||||
window with the [GLFW_HOVERED](@ref GLFW_HOVERED_attrib) window attribute.
|
||||
|
||||
@code
|
||||
if (glfwGetWindowAttrib(window, GLFW_HOVERED))
|
||||
{
|
||||
highlight_interface();
|
||||
}
|
||||
@endcode
|
||||
|
||||
|
||||
@subsection input_mouse_button Mouse button input
|
||||
|
||||
|
||||
Reference in New Issue
Block a user