using RothenburgAR.Common;
using UnityEngine;

namespace RothenburgAR.UI
{
    public class TutorialViewBehaviour : BaseViewBehaviour
    {
        public TutorialHighlightBehaviour reticuleHighlight;
        public TutorialHighlightBehaviour menuHighlight;
        public TutorialHighlightBehaviour selectHighlight;

        void OnEnable()
        {
            reticuleHighlight.SetText(LanguageManager.Instance.GetString("t_tutorial_reticule"));
            menuHighlight.SetText(LanguageManager.Instance.GetString("t_tutorial_settings"));
            selectHighlight.SetText(LanguageManager.Instance.GetString("t_tutorial_select"));
        }

        void Update()
        {
            if (Input.GetMouseButtonDown(0) == true ||
                (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Ended))
            {
                if (UIManager.Instance.StartingUp) SettingsManager.Instance.PersistSettings();
                UIManager.Instance.SwitchToView(ViewName.ARView);
            }
        }

    }
}