Table of Contents

Interface IInputSystem

Namespace
Icy.Input
Assembly
IcyUI.dll

An interface that provides engine-independent input system for the UI library.

public interface IInputSystem : IEnumerable<IInputDeviceListener>, IEnumerable, IInitializable
Inherited Members
Extension Methods

Properties

Clipboard

Gets the service for the platform clipboard implementation.

IClipboard Clipboard { get; }

Property Value

IClipboard

Events

Gets the service that provides input events for the UI elements.

IInputEventSystem Events { get; }

Property Value

IInputEventSystem

Gamepad

Gets the listener for the gamepad events.

IGamepadInput? Gamepad { get; }

Property Value

IGamepadInput

Remarks

Note that this UI framework doesn't define multiple gamepad support, so only main gamepad input will be received. You can implement it by yourself if it's necessary for your game. However, it will require multiple focus support. For that purposes, you'll have to make your own control focus system.

Keyboard

Gets the listener for the keyboard events.

IKeyboardInput? Keyboard { get; }

Property Value

IKeyboardInput

Mouse

Gets the listener for the mouse events.

IMouseInput Mouse { get; }

Property Value

IMouseInput

Touch

Gets the service for the touch events.

ITouchInput? Touch { get; }

Property Value

ITouchInput

Methods

GetInputDevice<T>()

Gets an input device listener for the specified type.

T GetInputDevice<T>() where T : IInputDeviceListener

Returns

T

An input device listener for the specified device type.

Type Parameters

T

Type of the device to get listener for.

Exceptions

KeyNotFoundException

Occurs when the device for the specified type is not connected.

IsDeviceAvailable<T>()

Determines whether the specified input device listener is connected to the input system.

bool IsDeviceAvailable<T>() where T : IInputDeviceListener

Returns

bool

true if the device is available; otherwise false.

Type Parameters

T

Type of the input device listener.

TryGetInputDevice<T>(out T?)

Tries to get a listener for the specified input device.

bool TryGetInputDevice<T>(out T? device) where T : IInputDeviceListener

Parameters

device T

Listener for the specified device.

Returns

bool

true if the device listener was acquired successfully; otherwise false.

Type Parameters

T

Type of the device to get a listener for.