Exemple #1
0
        protected override void OnStart()
        {
            base.OnStart();
            if (Btn != null)
            {
                Btn.AddClick(OnClickBtn);
                spNormal = Btn.normalSprite;
                spOver   = Btn.hoverSprite;
            }
            List.barInContent = true;
            UISprite btnSprite = Btn.GetComponent <UISprite>();

            if (isUpDirection)
            {
                List.transform.localPosition = new Vector3(List.transform.localPosition.x, List.ListHeight + 2, 0);
            }
            var objArrow = DisplayUtil.GetChildByName(Btn.transform, "spArrowDown");

            if (objArrow != null)
            {
                spArrow = objArrow.GetComponent <CButton>();
            }
            //else
            //{
            //    List.transform.localPosition = Btn.transform.localPosition + Vector3.down * btnSprite.height;
            //}
            //List.gameObject.SetActive(false);
            ActivieList(false);
        }