GLFW 3 Hide cursor

Started by Mihai_Ionut_Floares, January 08, 2021, 19:53:54

Previous topic - Next topic

Mihai_Ionut_Floares

I'm using this to set the cursor on the center of the screen to be able to pan the view around using mouse input like any other 3d game:
glfwSetCursorPos(WINDOW, Main.WIDTH/2, Main.HEIGHT/2);


It is working, but I want to add a crosshair. A simple GUI image centered. I want to keep the mouse functionality, but to hide it and keep only the crosshair.

Mihai_Ionut_Floares

Sorry. I just found the solution:
glfwSetInputMode(WINDOW, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);