示例#1
0
        public IEnumerator CreateSaveButton()
        {
            CustomClothesWindow window = Helpers.Field <CustomClothesWindow>(this.clothesSave, "clothesLoadWin");

            Transform   saveBtnTransform = this.clothesSave.transform.Find("buttons/btn02");
            UI_ButtonEx saveBtn          = saveBtnTransform.GetComponent <UI_ButtonEx>();
            Transform   saveBtnCopy      = UnityEngine.MonoBehaviour.Instantiate(saveBtn.transform, saveBtn.transform.parent);

            UnityEngine.MonoBehaviour.Destroy(saveBtnCopy.GetComponent <UI_ButtonEx>());

            UnityEngine.UI.Text text = saveBtnCopy.transform.Find("Text").GetComponent <UnityEngine.UI.Text>();
            text.color = Color.black;

            yield return(new WaitForSeconds(1));

            UI_ButtonEx newBtn = saveBtnCopy.gameObject.AddComponent <UI_ButtonEx>();

            UnityEngine.UI.Image image = newBtn.transform.Find("imgSelect").GetComponent <UnityEngine.UI.Image>();
            FieldInfo            info  = newBtn.GetType().GetField("overImage", BindingFlags.Instance | BindingFlags.NonPublic);

            info.SetValue(newBtn, image);

            newBtn.onClick.AddListener(() => {
                Illusion.Game.Utils.Sound.Play(Illusion.Game.SystemSE.ok_s);

                CvsC_ClothesInput input = Helpers.Field <CvsC_ClothesInput>(this.clothesSave, "clothesNameInput");
                CvsC_CreateCoordinateFile createFile = Helpers.Field <CvsC_CreateCoordinateFile>(this.clothesSave, "createCoordinateFile");

                if (null != input)
                {
                    input.SetupInputCoordinateNameWindow("");
                    input.actEntry = delegate(string buf)
                    {
                        string name     = "HS2CoordeF_" + DateTime.Now.ToString("yyyyMMddHHmmssfff");
                        string fullPath = this.currentDir + "/" + name + ".png";
                        createFile.CreateCoordinateFile(fullPath, buf, true);
                    };
                }
            });

            saveBtn.gameObject.SetActive(false);

            Debug.Log("CharaSelect :: FINISH SAVE REPLACE");
        }
        private void Reset()
        {
            Transform transform1 = ((Component)this).get_transform().Find("imgBack/sortinfo");

            if (Object.op_Inequality((Object)null, (Object)transform1))
            {
                this.objSortInfo = ((Component)transform1).get_gameObject();
            }
            Transform transform2 = ((Component)this).get_transform().Find("Image/RawImage");

            if (Object.op_Inequality((Object)null, (Object)transform2))
            {
                this.rawImage = (RawImage)((Component)transform2).GetComponent <RawImage>();
            }
            this.tglItem = (Toggle)((Component)this).GetComponent <Toggle>();
            Transform transform3 = ((Component)this).get_transform().Find("imgBack/sortinfo/rank");

            if (Object.op_Inequality((Object)null, (Object)transform3))
            {
                this.objRank = ((Component)transform3).get_gameObject();
            }
            Transform transform4 = ((Component)this).get_transform().Find("imgBack/sortinfo/rank/textRank");

            if (Object.op_Inequality((Object)null, (Object)transform4))
            {
                this.textRank = (Text)((Component)transform4).GetComponent <Text>();
            }
            this.imgRank = new Image[3];
            Transform transform5 = ((Component)this).get_transform().Find("imgBack/sortinfo/rank/imgRank00");

            if (Object.op_Inequality((Object)null, (Object)transform5))
            {
                this.imgRank[0] = (Image)((Component)transform5).GetComponent <Image>();
            }
            Transform transform6 = ((Component)this).get_transform().Find("imgBack/sortinfo/rank/imgRank01");

            if (Object.op_Inequality((Object)null, (Object)transform6))
            {
                this.imgRank[1] = (Image)((Component)transform6).GetComponent <Image>();
            }
            Transform transform7 = ((Component)this).get_transform().Find("imgBack/sortinfo/rank/imgRank02");

            if (Object.op_Inequality((Object)null, (Object)transform7))
            {
                this.imgRank[2] = (Image)((Component)transform7).GetComponent <Image>();
            }
            Transform transform8 = ((Component)this).get_transform().Find("imgBack/sortinfo/applausenum");

            if (Object.op_Inequality((Object)null, (Object)transform8))
            {
                this.objApplause = ((Component)transform8).get_gameObject();
            }
            Transform transform9 = ((Component)this).get_transform().Find("imgBack/sortinfo/applausenum/textApplauseNum");

            if (Object.op_Inequality((Object)null, (Object)transform9))
            {
                this.textApplauseNum = (Text)((Component)transform9).GetComponent <Text>();
            }
            Transform transform10 = ((Component)this).get_transform().Find("imgBack/sortinfo/applausenum/btnLike");

            if (Object.op_Inequality((Object)null, (Object)transform10))
            {
                this.btnLike = (UI_ButtonEx)((Component)transform10).GetComponent <UI_ButtonEx>();
            }
            Transform transform11 = ((Component)this).get_transform().Find("imgBack/sortinfo/date");

            if (Object.op_Inequality((Object)null, (Object)transform11))
            {
                this.objDate = ((Component)transform11).get_gameObject();
            }
            Transform transform12 = ((Component)this).get_transform().Find("imgBack/sortinfo/date/textUpTimeTitle");

            if (Object.op_Inequality((Object)null, (Object)transform12))
            {
                this.textDateTitle = (Text)((Component)transform12).GetComponent <Text>();
            }
            Transform transform13 = ((Component)this).get_transform().Find("imgBack/sortinfo/date/textUpTime");

            if (!Object.op_Inequality((Object)null, (Object)transform13))
            {
                return;
            }
            this.textDate = (Text)((Component)transform13).GetComponent <Text>();
        }