summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBehaviourBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBehaviourBase.cs')
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBehaviourBase.cs130
1 files changed, 130 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBehaviourBase.cs b/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBehaviourBase.cs
new file mode 100644
index 00000000..82af93d4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBehaviourBase.cs
@@ -0,0 +1,130 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI.UICommon
+{
+ public class DlgBehaviourBase : MonoBehaviour, IXUIBehaviour, IXUIObject
+ {
+ public IXUIObject parent
+ {
+ get
+ {
+ return null;
+ }
+ set
+ {
+ }
+ }
+
+ public ulong ID
+ {
+ get
+ {
+ return this.m_id;
+ }
+ set
+ {
+ this.m_id = value;
+ }
+ }
+
+ public bool Exculsive
+ {
+ get
+ {
+ return this.m_bExculsive;
+ }
+ set
+ {
+ this.m_bExculsive = value;
+ }
+ }
+
+ public IXUIDlg uiDlgInterface
+ {
+ get
+ {
+ return this.m_uiDlgInterface;
+ }
+ set
+ {
+ this.m_uiDlgInterface = value;
+ }
+ }
+
+ public IXUIObject[] uiChilds
+ {
+ get
+ {
+ return this.m_uiChilds;
+ }
+ }
+
+ private IXUIDlg m_uiDlgInterface = null;
+
+ private IXUIObject[] m_uiChilds = null;
+
+ private ulong m_id;
+
+ private bool m_bExculsive = false;
+
+ public bool IsVisible()
+ {
+ return base.gameObject.activeInHierarchy;
+ }
+
+ public void SetVisible(bool bVisible)
+ {
+ base.gameObject.SetActive(bVisible);
+ }
+
+ public IXUIObject GetUIObject(string strName)
+ {
+ Transform transform = base.transform.Find(strName);
+ bool flag = null != transform;
+ IXUIObject result;
+ if (flag)
+ {
+ result = transform.GetComponent<XUIObjectBase>();
+ }
+ else
+ {
+ result = null;
+ }
+ return result;
+ }
+
+ public void OnPress()
+ {
+ this.OnFocus();
+ }
+
+ public void OnFocus()
+ {
+ }
+
+ public virtual void Init()
+ {
+ IXUIObject[] componentsInChildren = base.GetComponentsInChildren<XUIObjectBase>();
+ this.m_uiChilds = componentsInChildren;
+ for (int i = 0; i < this.m_uiChilds.Length; i++)
+ {
+ XUIObjectBase xuiobjectBase = this.m_uiChilds[i] as XUIObjectBase;
+ xuiobjectBase.Init();
+ }
+ }
+
+ public virtual void Highlight(bool bTrue)
+ {
+ }
+
+ GameObject IXUIObject.gameObject
+ {
+ get
+ {
+ return base.gameObject;
+ }
+ }
+ }
+}