using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class EnableMeasUI : MonoBehaviour
{
    [SerializeField] private Toggle onOffToggle, autoToggle;
    [SerializeField] private Button button1, button2, button3, button4, button5, button6;
    [SerializeField] private Dropdown dropdown1, dropdown2;

    private void Start()
    {
        DisableUI();
    }

    /// <summary> Enable/Disable measurement panel features </summary>
    public void DisableUI()
    {
        if(!onOffToggle.isOn)
        {
            autoToggle.interactable = false;
            dropdown1.interactable = false;
            dropdown2.interactable = false;
            button1.interactable = false;
            button2.interactable = false;
            button3.interactable = false;
            button4.interactable = false;
            button5.interactable = false;
            button6.interactable = false;
        }
        else
        {
            button1.interactable = true;
            autoToggle.interactable = true;
            dropdown1.interactable = true;
            dropdown2.interactable = true;
            button1.interactable = true;
            button2.interactable = true;
            button3.interactable = true;
            button4.interactable = true;
            button5.interactable = true;
            button6.interactable = true;
        }
    }
}
