[−][src]Module xdl::vi
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 update
d when you update your game.
Coordinate system
X axis goes from left to right. Y axis goes from up to down. If not.. sorry!
Priority
Latest inputs always come as current state.
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 |
Enums
KeyRepeat | Key repeat settings |
StrictButtonState | Down | Up | Pressed | Repeating | Released |