using CG.Framework;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using DG.Tweening;
/*******************************************************************************
*Create By CG
*Function 操作步骤栏控制
*******************************************************************************/
namespace ZXK.GYJQR
{
public abstract class OperationStepPanel : UIBase
{
protected Transform _stepContent = null;
protected GameObject _stepItemPrefab = null;
protected GameObject _stepBigItemPrefab = null;
protected GameObject _stepSmallItemPrefab = null;
private Transform _curSelectStepBtn = null;
protected const float _smallItemSizeY = 25.0f;//每个子项大小
protected const float _smallItemIntervalY = 5.0f;//每个子项之间间隔
protected const float _smallParentInitPosY = -40.0f;//子项父物体初始位置
private const float _openCloseAnmSpeed = 0.01f;//开合动画播放速度控制
private Vector2 _focusInitSize = new Vector2(296.0f, 96.0f);
private Vector2 _stepsParentInitSize = new Vector2(296.0f, 462.0f);
protected override void Awake()
{
base.Awake();
_stepContent = GetWedage("StepContent_N").transform;
_stepItemPrefab = GetWedage("StepItemPrefab_N");
_stepBigItemPrefab = GetWedage("StepBigItemPrefab_N");
_stepSmallItemPrefab = GetWedage("StepSmallItemPrefab_N");
}
private void OnDisable()
{
DOTween.Kill("OpenSequence");
DOTween.Kill("CloseSequence");
}
///
/// 实例化数据到流程栏(带有二级菜单功能)
///
/// [id,stepName,stepchildrenName]
protected List InitStepSecondMenuDataUI(List partsInfo)
{
string curShowGeo = GameManager.Instance._DataBJCJHandler._ShowPartsName.Value;
string bigStep = "";
int bigStepIndex = 0;
float extensionTxt = 0;
RectTransform smallParent = null;
RectTransform stepBigRect = null;
List stepChildrens = new List();
foreach (string[] item in partsInfo)
{
if (!item[1].Equals(bigStep)&& !item[1].Equals("OVER"))
{
bigStepIndex++;
GameObject stepBigGeo = Instantiate(_stepBigItemPrefab, _stepContent);
stepBigRect = stepBigGeo.GetComponent();
smallParent = stepBigGeo.transform.Find("StepSmallParent").GetComponent();
stepBigGeo.name = curShowGeo+"_"+item[1];
stepBigGeo.transform.Find("TextIndex").GetComponent().text = bigStepIndex.ToString();
stepBigGeo.transform.Find("IsSelectBG/TextDetail").GetComponent().text = item[1];
Button bigBtn = null;
if(!stepBigGeo.transform.Find("BigBtnTri").TryGetComponent