Module xdl::vi[][src]

Virtual input, bundles of input states

About

Virtual input is good for typical input abstraction. For example, your “select key” may be any of enter, space, a gamepad button or even left click. Then the virtual input is perfect for bundling them.

However, they are not generic enough. For example, you might want to handle left click in a different way from enter key. Then you have to build your custom input system like UI commands, maybe using virtual input.

Lifecycle

Lifecycle types need to be updated when you update your game.

Coordinate system

X axis goes from left to right. Y axis goes from up to down. If it doesn’t match your needs.. sorry!

Priority

Latest inputs always come as current state.

serde support

TODO: add RON examples

Structs

AxisButton

Neg | Pos | Neutral

AxisDirButton

[x, y] axes translated as direction

Button

Input bundle with repeat state

InputBundle

Set of any kind of inputs

KeyEntry

Key with optionally modifier keys

Enums

KeyRepeatConfig

Key repeat settings

StrictButtonState

Down | Up | Pressed | Repeating | Released