glfwSetCursorEnterCallback¶
This function sets the cursor boundary crossing callback of the specified window, which is called when the cursor enters or leaves the client area of the window.
Example:
glfwSetCursorEnterCallback($window, function($entered) {
if ($entered) {
echo "Cursor entered window" . PHP_EOL;
} else {
echo "Cursor left window" . PHP_EOL;
}
});
- arguments
-
\GLFWwindow
$window
The window whose callback to set.callable
$callback
- returns
-
void