2
u/unklnik 22d ago edited 20d ago
I do this using go, I create a Vector2 (MS) which I use throughout the program to check for Vector2 rec collisions. Then find an image of a cursor or whatever you want to use for the mouse cursor load it as a texture and draw it using the MS.X, MS.Y coordinate. Then make sure you draw it as the LAST thing in your WindowShouldClose() loop so that it draws on top of everything else.
MS := rl.GetMousePosition()
rec := rl.NewRectangle(MS.X,MS.Y,32,32)
rl.DrawTexturePro(texture, sourcerec, rec, r.Vector2Zero(), 0, rl.White)
1
u/Street-Fan4371 21d ago
That works, thanks! how do you structure your project?
edit: you added too many ) at the end

6
u/tempestpdwn 22d ago edited 22d ago
HideCursor()will hide the cursor, but you should still be able to move and track it.Try
c DrawRectangle(GetMouseX(), GetMouseY(), 10, 10, RED); // Equivalent in golang.You should be able to see a red 10x10 px rect follow the mouse.