document a few more features
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
7f53dbec7a
commit
40f07ec30f
|
@ -57,6 +57,12 @@ var mouseX = Inputs.Mouse.X;
|
||||||
var deltaMouseY = Inputs.Mouse.DeltaY;
|
var deltaMouseY = Inputs.Mouse.DeltaY;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can also read scroll wheel movement. Negative values are down-scrolls, positive values are up-scrolls.
|
||||||
|
|
||||||
|
```cs
|
||||||
|
var wheel = Inputs.Mouse.Wheel;
|
||||||
|
```
|
||||||
|
|
||||||
`RelativeMode` hides the mouse and does not update the position of the mouse while still returning movement deltas.
|
`RelativeMode` hides the mouse and does not update the position of the mouse while still returning movement deltas.
|
||||||
This is ideal for creating FPS-style controls. To enable it, simply do:
|
This is ideal for creating FPS-style controls. To enable it, simply do:
|
||||||
|
|
||||||
|
@ -98,3 +104,15 @@ var rightMotorAmount = 0.5;
|
||||||
var durationInMilliseconds = 10;
|
var durationInMilliseconds = 10;
|
||||||
gamepad.SetVibration(leftMotorAmount, rightMotorAmount, durationInMilliseconds)
|
gamepad.SetVibration(leftMotorAmount, rightMotorAmount, durationInMilliseconds)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Text Input
|
||||||
|
|
||||||
|
Sometimes you might want to do something like divert keyboard inputs into a text box.
|
||||||
|
`Inputs` provides a `TextInput` callback that you can hook into for this purpose.
|
||||||
|
|
||||||
|
```cs
|
||||||
|
Inputs.TextInput += c =>
|
||||||
|
{
|
||||||
|
ImGui.GetIO().AddInputCharacter(c);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue