Table of Contents

Class InputSourceBase

Namespace
Stride.Input
Assembly
Stride.Input.dll

Base class for input sources, implements common parts of the IInputSource interface and keeps track of registered devices through RegisterDevice(IInputDevice) and UnregisterDevice(IInputDevice)

public abstract class InputSourceBase : IInputSource, IDisposable
Inheritance
InputSourceBase
Implements
Derived
Extension Methods

Properties

Devices

All the input devices currently proviced by this source

public TrackingDictionary<Guid, IInputDevice> Devices { get; }

Property Value

TrackingDictionary<Guid, IInputDevice>

Methods

Dispose()

Unregisters all devices registered with RegisterDevice(IInputDevice) which have not been unregistered yet

public virtual void Dispose()

Initialize(InputManager)

Initializes the input source

public abstract void Initialize(InputManager inputManager)

Parameters

inputManager InputManager

The InputManager initializing this source

Pause()

Called when input should be paused, for example when the application leaves the foreground

public virtual void Pause()

RegisterDevice(IInputDevice)

Adds the device to the list Devices

protected void RegisterDevice(IInputDevice device)

Parameters

device IInputDevice

The device

Resume()

Called when input should be resumed, when an application enters the forground

public virtual void Resume()

Scan()

Allows the source to take it's time to search for new devices

public virtual void Scan()

UnregisterDevice(IInputDevice)

CRemoves the device from the list Devices

protected void UnregisterDevice(IInputDevice device)

Parameters

device IInputDevice

The device

Update()

Update the input source and possibly add/remove input devices

public virtual void Update()