glfwSetScrollCallback¶
This function sets the scroll callback of the specified window, which is called when a scrolling device is used, such as a mouse wheel or scrolling area of a touchpad.
Example:
glfwSetScrollCallback($window, function($xoffset, $yoffset) {
echo "Scroll offset: " . $xoffset . ", " . $yoffset . PHP_EOL;
});
- arguments
-
\GLFWwindow
$window
The window whose callback to set.callable
$callback
- returns
-
void