Class DeviceCaptureState
The capture state of one input device: which owner holds the device or its pointers, and whether reads of the device by scripts and systems are masked.
public sealed class DeviceCaptureState
- Inheritance
-
objectDeviceCaptureState
- Extension Methods
Remarks
Only InputManager changes this state, through its capture methods.
Constructors
DeviceCaptureState()
public DeviceCaptureState()
Properties
IsCaptured
Gets a value indicating whether an owner holds the whole device.
public bool IsCaptured { get; }
Property Value
IsMasked
Gets a value indicating whether reads of the device by scripts and systems report no input.
public bool IsMasked { get; }
Property Value
Owner
Gets the owner that holds the whole device, or null when the device is not captured.
public object Owner { get; }
Property Value
- object
Priority
Gets the priority the current owner captured the device with.
public int Priority { get; }
Property Value
Methods
GetPointerOwner(int)
Gets the owner that holds a pointer of this device, or null when the pointer is not captured.
public object GetPointerOwner(int pointerId)
Parameters
pointerIdintThe pointer identifier.
Returns
- object
IsPointerMasked(int)
Gets a value indicating whether reads of a pointer by scripts and systems report no input, because the pointer or the whole device is captured.
public bool IsPointerMasked(int pointerId)
Parameters
pointerIdintThe pointer identifier.
Returns
TrackButtons<T>(IReadOnlySet<T>, IReadOnlySet<T>, IReadOnlySet<T>, IReadOnlySet<T>)
Creates a tracker that presents a device's down, pressed and released sets with this capture state applied.
public ButtonCaptureTracker<T> TrackButtons<T>(IReadOnlySet<T> down, IReadOnlySet<T> pressed, IReadOnlySet<T> released, IReadOnlySet<T> newPresses = null)
Parameters
downIReadOnlySet<T>The input that is down.
pressedIReadOnlySet<T>The input pressed this frame.
releasedIReadOnlySet<T>The input released this frame.
newPressesIReadOnlySet<T>The input newly pressed this frame, excluding repeats. Defaults to
pressedfor devices that do not repeat.
Returns
- ButtonCaptureTracker<T>
The tracker, which follows this capture state for the lifetime of the device.
Type Parameters
TThe key or button type.