Closed bendgk closed 2 years ago
@bendgk Thanks for the PR!
You can use:
myGlfwWindow.SetInputMode(glfw.CursorMode, glfw.CursorHidden)
If you are using engine/app
then you can do:
a.IWindow.(*window.GlfwWindow).SetInputMode(glfw.CursorMode, glfw.CursorHidden)
where a is an Application
instance.
You can directly use any glfw method you want since GlfwWindow
embeds a *glfw.Window
Implemented
GLFW_CURSOR_DISABLED
andGLFW_CURSOR_HIDDEN
as per the glfw (input mode)[https://www.glfw.org/docs/3.3/input_guide.html#cursor_mode] specifications.Created two new cursor types:
window.DisabledCursor
window.HiddenCursor
Example:
DisabledCursor
HiddenCursor
This will allow people to use g3n to create games or other interactive applications that require mouse capture.