How to change the mouse cursor?

Monkey Targets Forums/Desktop/How to change the mouse cursor?

Ratchet(Posted 2016) [#1]
How to set another mouse cursor on Desktop Game (glfw3) target?


Soap(Posted 2016) [#2]
Do you want to set a hardware cursor, or just have a custom image as the cursor?

Software cursor is easier. Then you just hide the hardware cursor, and position the image to the x,y of the hardware cursor.

You'll need to use native code to edit the hardware cursor

http://www.glfw.org/docs/latest/group__shapes.html

http://www.glfw.org/docs/latest/group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e

Google has all of the answers if you get problems


Ratchet(Posted 2016) [#3]
I want to change the hardware cursor.
Can someone help me to do that in MX, please?

Google has all of the answers if you get problems

This is a big lie.


Soap(Posted 2016) [#4]
You need to know what to search for. Monkey uses GLFW, so anything in GLFW will mostly be valid. That's what you search for.

I believe glfwCreateCursor in the GLFW function you want to use if you want custom hardware cursor images. Do you know how to use native code already?

http://www.glfw.org/docs/latest/group__input.html#gafca356935e10135016aa49ffa464c355

I'll make an example a bit later when I have the time to if you cannot figure it out on your own by then.


Ratchet(Posted 2016) [#5]
I think I have to use
glfwSetCursor(GLFWwindow * window, GLFWcursor *  cursor)

but no idea where I got window from and how to import the GLFWcursor constants...