mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
parent
5f4e66b21a
commit
62d296992e
@ -251,6 +251,20 @@ static void key_callback(GLFWwindow* window, int key, int scancode, int action,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case GLFW_KEY_UP:
|
||||||
|
glfwSetCursorPos(window, 0, 0);
|
||||||
|
glfwGetCursorPos(window, &cursor_x, &cursor_y);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GLFW_KEY_DOWN:
|
||||||
|
{
|
||||||
|
int width, height;
|
||||||
|
glfwGetWindowSize(window, &width, &height);
|
||||||
|
glfwSetCursorPos(window, width - 1, height - 1);
|
||||||
|
glfwGetCursorPos(window, &cursor_x, &cursor_y);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case GLFW_KEY_0:
|
case GLFW_KEY_0:
|
||||||
glfwSetCursor(window, NULL);
|
glfwSetCursor(window, NULL);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user