// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using UnityEngine;
using UnityEngine.Events;
namespace Microsoft.MixedReality.Toolkit.Experimental.InteractiveElement
{
///
/// The event configuration for the SelectFar InteractionState.
///
public class SelectFarEvents : BaseInteractionEventConfiguration
{
[SerializeField]
[Tooltip("Whether or not to register the IMixedRealityPointerHandler for global input. If Global is true, then" +
" events in the SelectFar state will be fired without requiring an object to be in focus. ")]
private bool global = false;
///
/// Whether or not to register the IMixedRealityPointerHandler for global input. If Global is true, then
/// events in the SelectFar state will be fired without requiring an object to be in focus.
///
public bool Global
{
get => global;
set
{
global = value;
OnGlobalChanged.Invoke();
}
}
///
/// A Unity event used to track whether or not the Global property has changed.
///
[HideInInspector]
public UnityEvent OnGlobalChanged = new UnityEvent();
///
/// A Unity event with MixedRealityPointerEventData.
///
public SelectFarInteractionEvent OnSelectDown = new SelectFarInteractionEvent();
///
/// A Unity event with MixedRealityPointerEventData.
///
public SelectFarInteractionEvent OnSelectUp = new SelectFarInteractionEvent();
///
/// A Unity event with MixedRealityPointerEventData.
///
public SelectFarInteractionEvent OnSelectHold = new SelectFarInteractionEvent();
///
/// A Unity event with MixedRealityPointerEventData.
///
public SelectFarInteractionEvent OnSelectClicked = new SelectFarInteractionEvent();
}
}