// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using UnityEngine;
using UnityEngine.UI;
namespace Microsoft.MixedReality.Toolkit.Experimental.UI
{
///
/// Updates the visual state of the text based on the buttons state
///
public class SymbolDisableHighlight : MonoBehaviour
{
///
/// The text field to update.
///
[Experimental]
[SerializeField]
private Text m_TextField = null;
///
/// The text field to update.
///
[SerializeField]
private Image m_ImageField = null;
///
/// The color to switch to when the button is disabled.
///
[SerializeField]
private Color m_DisabledColor = Color.grey;
///
/// The color the text field starts as.
///
private Color m_StartingColor = Color.white;
///
/// The button to check for disabled/enabled.
///
private Button m_Button = null;
///
/// Standard Unity start.
///
private void Start()
{
if (m_TextField != null)
{
m_StartingColor = m_TextField.color;
}
if (m_ImageField != null)
{
m_StartingColor = m_ImageField.color;
}
m_Button = GetComponentInParent