How to use Input in OpenTK 1.0? There is not much info around, some classes are unfinished.
What I want to achieve, is to be able to use input not only in OnUpdate function, but also in other classes created by myself.
How to use Input in OpenTK 1.0? There is not much info around, some classes are unfinished.
What I want to achieve, is to be able to use input not only in OnUpdate function, but also in other classes created by myself.
Check out OpenTK.Input.
From there you can get access to OpenTK.Input.Mouse and
Some examples from the page include:
To check whether a button is pressed:
using OpenTK.Input;
var mouse = Mouse.GetState();
if (mouse[MouseButton.Left])
{
// Left mouse button is pressed
}
To check whether a mouse button is not pressed:
using OpenTK.Input;`
var mouse = Mouse.GetState();
if (!mouse[MouseButton.Left])
{
// Left mouse button is not pressed
}