protected override void OnInit(QFramework.IUIData uiData)
 {
     mData = uiData as UIHomePanelData ?? new UIHomePanelData();
     // please add init code here
     //UdpManager.Instance.onGetReceive += OnGetReceive;
     MainBtn.onClick.AddListener(() => Debug.Log("MainBtn Click!"));
 }
예제 #2
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as UIKitTestPanelData ?? new UIKitTestPanelData();
            // please add init code here

            mData.OnInitCalledCount++;
        }
예제 #3
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as UIUploadPanelData ?? new UIUploadPanelData();
            // please add init code here
            ActivityIndex = mData.ActivityIndex.ToLower();

            Query.onClick.AddListener(() =>
            {
                var lst = new List <Transform>();
                foreach (Transform child in Content)
                {
                    lst.Add(child);
                }
                for (int i = 0; i < lst.Count; i++)
                {
                    Destroy(lst[i].gameObject);
                }
                var str = ItemIdDropdown.GetComponent <Dropdown>().captionText.text;
                if (str.IndexOf("SkinName") > -1)
                {
                    ItemId = str.Split('|')[1].Split(':')[1];
                    StartCoroutine(GetAttachments("Skin", ItemId));
                }
            });
            Home.onClick.AddListener(() =>
            {
                UIMgr.ClosePanel("UIUploadPanel");
            });
            Auth = PlayerPrefs.GetString("access_token");
            StartCoroutine(GetItemId(int.Parse(mData.id)));
            ActivityText.text = ActivityIndex;
        }
예제 #4
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as UICompletedListData ?? new UICompletedListData();
            // please add init code here
            onDataChanged();

            RegisterEvent(UICompletedListEvent.OnDataChanged);
        }
예제 #5
0
        protected override void OnOpen(QFramework.IUIData uiData)
        {
            mData = uiData as UIHomePanelData ?? mData;

            if (mData.ShowRestartBtn)
            {
                BtnRestart.Show();
            }
        }
예제 #6
0
 protected override void OnInit(QFramework.IUIData uiData)
 {
     mData = uiData as LoadingWndData ?? new LoadingWndData();
     // please add init code here
     mData.fgWidth                    = this.loadingfg.GetComponent <RectTransform>().sizeDelta.x;
     this.txtTips.text                = "这是一条游戏Tips";
     this.txtPrg.text                 = "0%";
     this.loadingfg.fillAmount        = 0;
     imgPoint.transform.localPosition = new Vector3(-545f, 0, 0);
 }
예제 #7
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as UIHomePanelData ?? new UIHomePanelData();
            // please add init code here

            BtnStart.OnClickAsObservable().Subscribe(_ =>
            {
                StartHide();
                UIMgr.OpenPanel <UIGamePanel>();
            });
        }
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as UISomePanelFromResourcesData ?? new UISomePanelFromResourcesData();
            // please add init code here

            BtnCloseSelf.onClick.AddListener(() =>
            {
//                UIMgr.CloseAllPanel();

                UIKit.ClosePanel("resources://" + typeof(UISomePanelFromResources).Name);
            });
        }
예제 #9
0
 protected override void OnInit(QFramework.IUIData uiData)
 {
     mData = uiData as UIPropertiesPanelData ?? new UIPropertiesPanelData();
     // please add init code here
     Item.gameObject.SetActive(false);
     Properties = mData.Properties;
     SetProperties(mData.Properties);
     btnClose.onClick.AddListener(() =>
     {
         UIMgr.ClosePanel("UIPropertiesPanel");
     });
 }
예제 #10
0
 protected override void OnInit(QFramework.IUIData uiData)
 {
     mData = uiData as UIActivityPanelData ?? new UIActivityPanelData();
     // please add init code here
     Guide.onClick.AddListener(GuideToTexturePackage);
     Start.onClick.AddListener(StartClick);
     ActivityOptions.GetComponent <Dropdown>().onValueChanged.AddListener(ActivityOptionChanged);
     StartCoroutine(GetActivityList(1));
     ActivityOptions.GetComponent <Dropdown>().ClearOptions();
     ActivityOptions.GetComponent <Dropdown>().AddOptions(new List <string>
     {
         "请先选择互动"
     });
 }
예제 #11
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as UIHotFixCheckPanelData ?? new UIHotFixCheckPanelData();
            // please add init code here

            BtnUpdate.onClick.AddListener(() =>
            {
                mData.OnOk.InvokeGracefully();
            });

            BtnCancel.onClick.AddListener(() => { mData.OnCancel.InvokeGracefully(); });

            Content.text = "服务器版本:" + mData.ServerVersion + "\n本地版本:" + mData.LocalVersion;
        }
예제 #12
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as UILoginPanelData ?? new UILoginPanelData();
            // please add init code here
            Login.onClick.AddListener(() =>
            {
                StartCoroutine(LoginClick());
            });

            if (PlayerPrefs.HasKey("access_token"))
            {
                var auth = PlayerPrefs.GetString("access_token");
                StartCoroutine(TestAuth(auth));
            }
        }
예제 #13
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as UITodoListData ?? new UITodoListData();
            // please add init code here
            //Text.text = mData.Model.mTodoitem.Count.ToString();

            //mData.Model.mTodoitem.ForEach(item =>
            //{
            //    UITodoitem.Instantiate()
            //              .Parent(Content)
            //              .LocalIdentity()
            //              .ApplySelfTo((self)=>self.Init(item))
            //              .Show();
            //});
            onDataChanged();

            RegisterEvent(UITodoListEvent.OnDataChanged);
            RegisterEvent(UITodoListEvent.OnTodoitemSelected);
        }
예제 #14
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as UpdateTipPanelData ?? new UpdateTipPanelData();
            if (mData.isHideConfirmButton)
            {
                BtnConfirm.gameObject.SetActive(false);
            }
            if (mData.isHideCancelButton)
            {
                BtnCancel.gameObject.SetActive(false);
            }

            TextVersion.text = mData.version;
            TextTip.text     = mData.message;
            BtnCancel.onClick.AddListener(() => {
                Back();
            });
            BtnConfirm.onClick.AddListener(() => {
                Application.OpenURL(mData.url);
            });
        }
예제 #15
0
 protected override void OnOpen(QFramework.IUIData uiData)
 {
 }
예제 #16
0
 protected override void OnInit(QFramework.IUIData uiData)
 {
     mData = uiData as FluentTextCanvasData ?? new FluentTextCanvasData();
     // please add init code here
 }
예제 #17
0
 protected override void OnInit(QFramework.IUIData uiData)
 {
     mData = uiData as FGUIPanelData ?? new FGUIPanelData();
     // please add init code here
 }
예제 #18
0
 protected override void OnInit(QFramework.IUIData uiData)
 {
     mData = uiData as CommonConfirmData ?? new CommonConfirmData();
 }
예제 #19
0
 protected override void OnOpen(QFramework.IUIData uiData)
 {
     mData.OnOpenCalledCount++;
 }
예제 #20
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as UIResourcePanelData ?? new UIResourcePanelData();
            // please add init code here
            var activity = mData.activityIndex;
            var id       = mData.id;

            TextLabel.text = "ResArea-" + activity;
            var version = PlayerPrefs.GetString("Version");

            gameObject.AddComponent <FileDragAndDrop>();
            DirTools.ActivityIndex = activity;
            DirTools.Version       = version;
            TypeEventSystem.Register <ResBlockNameChanged>(NameChanged);
            Export.onClick.AddListener(ExportRes);
            Clear.onClick.AddListener(ClearRes);
            God.onClick.AddListener(() =>
            {
                UIMgr.OpenPanel("UIUploadPanel", UILevel.Common, new UIUploadPanelData()
                {
                    ActivityIndex = activity,
                    id            = id
                });
            });
            TypeEventSystem.Register <RemoveBlock>((tmp) => {
                var md5 = tmp.MD5;

                ResMap.Remove(md5);
                string resDir   = DirTools.GetTmpResDir();
                string filepath = Path.Combine(resDir, md5 + tmp.Extension);
                if (File.Exists(filepath))
                {
                    File.Delete(filepath);
                }
                else
                {
                    Debug.LogError("资源不存在!!!");
                }
            });
            TypeEventSystem.Register <SetBlockProperties>((tmp) => {
                var md5        = tmp.MD5;
                var properties = tmp.properties;
                var ResBlock   = ResMap[md5];
                ResBlock.GetComponent <ResBlockScript>().Properties = properties;
            });
            TypeEventSystem.Register <ClearRescoursePanel>((tmp) => {
                ResMap.Clear();
                var lst = new List <Transform>();
                foreach (Transform child in Content)
                {
                    lst.Add(child);
                }
                for (int i = 0; i < lst.Count; i++)
                {
                    Destroy(lst[i].gameObject);
                }
                DirTools.DeleteFolder(DirTools.GetTmpResDir());
            });

            TypeEventSystem.Register <FilePathInfo>((file) =>
            {
                if (ResMap.ContainsKey(file.MD5))
                {
                    return;
                }
                else if (file.Extension == ".zip")
                {
                    MessageBoxV2.AddMessage("暂不支持拖入zip", 3);
                }
                else
                {
                    var BlockImage = Instantiate(ResBlockPrefab, Content);
                    BlockImage.GetComponent <ResBlockScript>().SetImage(file);
                    DirTools.CopyDropFileToTmpResDir(file);
                    ResMap.Add(file.MD5, BlockImage);
                }
            });
            DirTools.CleanUpDir();
            ResMap.Clear();
#if UNITY_EDITOR
            Invoke("Test", 3.0f);
#endif
        }
예제 #21
0
 protected override void OnInit(QFramework.IUIData uiData)
 {
     mData = uiData as LoginWndData ?? new LoginWndData();
     // please add init code here
 }