Skip to content

InputAPI reference

Interface IInputLayer

Namespace: MicroEngine.Input
Assembly: MicroEngine.Input.dll
Guide: Input

One stage of input routing: user interface, on-screen controls, a debug console, a rebinding screen. Events reach the layers from the highest order down (InputLayers); a layer that returns true takes the event, and nothing below it (other layers, the actions of gameplay) sees it.

C#
public interface IInputLayer

Remarks

A layer that takes a press also gets everything that press starts: the same pointer’s moves until it lifts, the same key’s or button’s release. So a finger that went down on an on-screen button stays the button’s even when it slides away, and a key that opened a menu does not reach gameplay when it is let go.

Methods

Handle(in InputEvent)

Handles one event; returns true to take it from every layer and from gameplay below.

C#
bool Handle(in InputEvent e)

Parameters

e InputEvent

Returns

bool