// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using Microsoft.MixedReality.Toolkit.Utilities; using UnityEngine.EventSystems; namespace Microsoft.MixedReality.Toolkit.Input { /// /// Describes an Input Event that has a source id. /// public class InputEventData : BaseInputEventData { /// /// Handedness of the . /// public Handedness Handedness { get; private set; } = Handedness.None; /// public InputEventData(EventSystem eventSystem) : base(eventSystem) { } /// /// Used to initialize/reset the event and populate the data. /// public void Initialize(IMixedRealityInputSource inputSource, Handedness handedness, MixedRealityInputAction inputAction) { BaseInitialize(inputSource, inputAction); Handedness = handedness; } } /// /// Describes and input event with a specific type. /// /// public class InputEventData : InputEventData { /// /// The input data of the event. /// public T InputData { get; private set; } /// public InputEventData(EventSystem eventSystem) : base(eventSystem) { } /// /// Used to initialize/reset the event and populate the data. /// public void Initialize(IMixedRealityInputSource inputSource, Handedness handedness, MixedRealityInputAction inputAction, T data) { Initialize(inputSource, handedness, inputAction); InputData = data; } } }