From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Scripts/XMainClient/UI/DemoUIBehaviour.cs | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/UI/DemoUIBehaviour.cs (limited to 'Client/Assets/Scripts/XMainClient/UI/DemoUIBehaviour.cs') diff --git a/Client/Assets/Scripts/XMainClient/UI/DemoUIBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/DemoUIBehaviour.cs new file mode 100644 index 00000000..e212625a --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/UI/DemoUIBehaviour.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using UILib; +using UnityEngine; +using XMainClient.UI.UICommon; +using XUtliPoolLib; + +namespace XMainClient.UI +{ + internal class DemoUIBehaviour : DlgBehaviourBase + { + public IXUIButton m_Button = null; + + public IXUIButton m_PreviousButton = null; + + public IXUIButton m_NextButton = null; + + public IXUIInput m_Input = null; + + public IXUIButton m_Close = null; + + public XUIPool m_MessagePool; + + public List m_ActiveMessages; + + public IXUIScrollView m_ScrollView; + + public GameObject m_Bg; + + public IXUILabel m_fps = null; + + public IXUIButton m_Open = null; + + private void Awake() + { + this.m_Bg = base.transform.Find("Bg").gameObject; + Transform transform = base.transform.Find("Bg/DebugCommitBtn"); + bool flag = null != transform; + if (flag) + { + this.m_Button = (transform.GetComponent("XUIButton") as IXUIButton); + } + this.m_PreviousButton = (base.transform.Find("Bg/PreviousBtn").GetComponent("XUIButton") as IXUIButton); + this.m_NextButton = (base.transform.Find("Bg/NextBtn").GetComponent("XUIButton") as IXUIButton); + this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton); + Transform transform2 = base.transform.Find("Bg/DebugDlgInput"); + bool flag2 = null != transform2; + if (flag2) + { + this.m_Input = (transform2.GetComponent("XUIInput") as IXUIInput); + } + this.m_ScrollView = (base.transform.Find("Bg/MessageDisplay").GetComponent("XUIScrollView") as IXUIScrollView); + this.m_MessagePool = new XUIPool(XSingleton.singleton.m_uiTool); + this.m_MessagePool.SetupPool(base.transform.Find("Bg/MessageDisplay").gameObject, base.transform.Find("Bg/MessageDisplay/MessageTpl").gameObject, DemoUI.MAX_MESSAGE_COUNT, false); + this.m_ActiveMessages = new List((int)DemoUI.MAX_MESSAGE_COUNT); + Transform transform3 = base.transform.Find("fps"); + bool flag3 = null != transform3; + if (flag3) + { + this.m_fps = (transform3.GetComponent("XUILabel") as IXUILabel); + Transform transform4 = transform3.Find("Open"); + bool flag4 = transform4 != null; + if (flag4) + { + this.m_Open = (transform4.GetComponent("XUIButton") as IXUIButton); + } + } + } + } +} -- cgit v1.1-26-g67d0