using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityGameFramework.Runtime;
using GameFramework;
using GameFramework.DataTable;
using GameFramework.Sound;
namespace MetaClient
{
    public class CustomRole : UGuiForm
    {
        [Header("选择功能分类界面")]
        public GameObject toolView;
        [Header("列表分类界面")]
        public GameObject ButtonList;
        [Header("历史记录")]
        public List<string> historyStr;

        [SerializeField]
        private IDataTable<DRCustomRole> customRoleData;


        //[Header("捏脸界面")]
        //public GameObject nieLianView;
        //[Header("身体修改界面")]
        //public GameObject bodyChangeView;
        //[Header("服装修改界面")]
        //public GameObject clothChangeView;
        //[SerializeField]
        //private EFinchFaceCengJi eFinchFaceCengJi = EFinchFaceCengJi.None;//默认为未开始选择层级
        //[SerializeField]
        //private EFinchFaceStyple eFinchFaceStyple = EFinchFaceStyple.None;//默认为未选择界面分支 




        protected override void OnOpen(object userData) {

            base.OnOpen(userData);
            IDataTable<DRCustomRole> _data = GameEntry.DataTable.GetDataTable<DRCustomRole>();
            customRoleData = _data;
        }


        //public void ButtonDragFun(int _id) {
        //    DRCustomRole _button = customRoleData.GetDataRow(_id);
        //    int _buttonStyple = _button.ButtonStyple;
        //    switch ((EButtonStyple)_buttonStyple) 
        //    {
        //        case EButtonStyple.Button:
        //            break;
        //        case EButtonStyple.Scroll:
        //            break;
        //        case EButtonStyple.TiaoSe:
        //            break;
        //        case EButtonStyple.NorButton:
        //            break;
        //    }
        //}
        public void ButtonDragWay(DRCustomRole _button) {
            string[] _strArrary = _button.ButtonPushFun.Split(new char[] { ',' });
            if (_strArrary[0] == "1")
            {
                string _str = _button.ButtonPushFun;
                historyStr.Add(_str);
            }
        }



        protected override void OnClose(bool isShutdown, object userData)
        {
            base.OnClose(isShutdown, userData);
        }

        public void ClickFaceChangeBtn()
        {
            GameEntry.Event.Fire(this, CustomRoleFaceEventArgs.Create(EditableFacePart.eye, new Vector3(1, 0, 0)));
        }
    }

}
