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!")); }
protected override void OnInit(QFramework.IUIData uiData) { mData = uiData as UIKitTestPanelData ?? new UIKitTestPanelData(); // please add init code here mData.OnInitCalledCount++; }
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; }
protected override void OnInit(QFramework.IUIData uiData) { mData = uiData as UICompletedListData ?? new UICompletedListData(); // please add init code here onDataChanged(); RegisterEvent(UICompletedListEvent.OnDataChanged); }
protected override void OnOpen(QFramework.IUIData uiData) { mData = uiData as UIHomePanelData ?? mData; if (mData.ShowRestartBtn) { BtnRestart.Show(); } }
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); }
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); }); }
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"); }); }
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> { "请先选择互动" }); }
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; }
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)); } }
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); }
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); }); }
protected override void OnOpen(QFramework.IUIData uiData) { }
protected override void OnInit(QFramework.IUIData uiData) { mData = uiData as FluentTextCanvasData ?? new FluentTextCanvasData(); // please add init code here }
protected override void OnInit(QFramework.IUIData uiData) { mData = uiData as FGUIPanelData ?? new FGUIPanelData(); // please add init code here }
protected override void OnInit(QFramework.IUIData uiData) { mData = uiData as CommonConfirmData ?? new CommonConfirmData(); }
protected override void OnOpen(QFramework.IUIData uiData) { mData.OnOpenCalledCount++; }
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 }
protected override void OnInit(QFramework.IUIData uiData) { mData = uiData as LoginWndData ?? new LoginWndData(); // please add init code here }