using System;
using MotionFramework;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;

namespace ToolsPack
{
    /// <summary>
    /// 工具菜单按钮事件
    /// </summary>
    public class ToolsPackMenuBtOnClick : MonoBehaviour
    {
        private void Start()
        {
            this.GetComponent<Button>().onClick.AddListener(delegate
            {
                // if (MotionEngine.GetModule<ToolsPackManager>().GetToolsPackScene() == ToolsPackScene.其他)
                // {
                //     Backpack.instance.transform.localScale = Vector3.one;
                // }
                // else if (MotionEngine.GetModule<ToolsPackManager>().GetToolsPackScene() == ToolsPackScene.现场堪察)
                // {
                //     Backpack.instance.transform.localScale = Vector3.one;
                // }
                // else
                // {
                //     GameObject towin = MotionEngine.GetModule<ToolsPackManager>().GetToolsPackWindowTemp();
                //     if (towin == null)
                //     {
                //         GameObject win = MotionEngine.GetModule<ToolsPackManager>().GetToolsPackWindow();
                //         MotionEngine.GetModule<ToolsPackManager>().SetToolsPackWindowTemp(Instantiate(win, MotionEngine.GetModule<ToolsPackManager>().GetCanvas(), false));
                //     }
                //     else
                //     {
                //         towin.SetActive(true);
                //     }
                // }
            });
        }
    }
}