// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using Microsoft.MixedReality.Toolkit.UI.BoundsControlTypes; using UnityEngine; using UnityEngine.Events; namespace Microsoft.MixedReality.Toolkit.UI.BoundsControl { /// /// Configuration for used in . /// This class provides all data members needed to create axis based handles for . /// public abstract class PerAxisHandlesConfiguration : HandlesBaseConfiguration { [SerializeField] [Tooltip("Determines the type of collider that will surround the handle prefab.")] private HandlePrefabCollider handlePrefabColliderType = HandlePrefabCollider.Box; /// /// Determines the type of collider that will surround the handle prefab. /// public HandlePrefabCollider HandlePrefabColliderType { get { return handlePrefabColliderType; } set { if (handlePrefabColliderType != value) { handlePrefabColliderType = value; colliderTypeChanged.Invoke(); } } } [SerializeField] [Tooltip("Shows handles for the X axis.")] private bool showHandleForX = true; /// /// Shows handles for the X axis. /// public bool ShowHandleForX { get { return showHandleForX; } set { if (showHandleForX != value) { showHandleForX = value; handlesChanged.Invoke(HandlesChangedEventType.Visibility); } } } [SerializeField] [Tooltip("Shows handles for the Y axis.")] private bool showHandleForY = true; /// /// Shows handles for the Y axis. /// public bool ShowHandleForY { get { return showHandleForY; } set { if (showHandleForY != value) { showHandleForY = value; handlesChanged.Invoke(HandlesChangedEventType.Visibility); } } } [SerializeField] [Tooltip("Shows handles for the Z axis.")] private bool showHandleForZ = true; /// /// Shows handles for the Z axis. /// public bool ShowHandleForZ { get { return showHandleForZ; } set { if (showHandleForZ != value) { showHandleForZ = value; handlesChanged.Invoke(HandlesChangedEventType.Visibility); } } } internal UnityEvent colliderTypeChanged = new UnityEvent(); } }