mirror of
https://github.com/glfw/glfw.git
synced 2026-01-11 15:23:17 +01: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
|
||||
|
||||
|
||||
@@ -1220,6 +1220,11 @@ See @ref window_iconify for details.
|
||||
__GLFW_MAXIMIZED__ indicates whether the specified window is maximized. See
|
||||
@ref window_maximize for details.
|
||||
|
||||
@anchor GLFW_HOVERED_attrib
|
||||
__GLFW_HOVERED__ indicates whether the cursor is currently directly over the
|
||||
client area of the window, with no other windows between. See @ref cursor_enter
|
||||
for details.
|
||||
|
||||
@anchor GLFW_VISIBLE_attrib
|
||||
__GLFW_VISIBLE__ indicates whether the specified window is visible. See @ref
|
||||
window_hide for details.
|
||||
|
||||
Reference in New Issue
Block a user