using UnityEngine; using System.Collections; using System.Collections.Generic; using System; using UnityEngine.UI; using UnityEngine.Events; using UnityEngine.EventSystems; using GameFramework.Event; /// /// 对话框类型 /// public enum E_DialogType { /// /// 一个按钮 /// OneButton = 1, /// /// 两个按钮 /// TwoBntton = 2, } /// /// 提示级别 /// public enum E_CueLevel { /// /// 低级(提示作用,只有一个确定) /// Low = 0, /// /// 中级(重新更新) /// Mid = 1, /// /// 高级(重新登陆) /// High = 2, /// /// 超级(重新更新 重新登陆) /// Super = 3, } /// /// 对话框 /// public class UI_CueDialog : MonoBehaviour { /// /// 提示框单键 /// private static UI_CueDialog mInstance = null; /// /// 提示框主体 /// private GameObject mCueObj = null; /// /// 背景,有碰撞,遮挡其他 UI /// private GameObject mBG = null; /// /// 出提示框对象 /// private GameObject mTipsObj = null; /// /// 出提示框的时间间隔 /// private int mInterval = 0; /// /// 确定按钮 /// private Button mButtonConfirm = null; /// /// 确定按钮上的文字 /// private Text mConfirmText = null; /// /// 取消按钮 /// private Button mButtonCancel = null; /// /// 取消按钮上的文字 /// private Text mCancelText = null; /// /// 标题 /// private Text mTitle = null; /// /// 内容 /// private Text mContent = null; /// /// 提示内容 /// private Text mTipsContent = null; /// /// 确定回调 /// private Action mAc_Confirm = null; /// /// 取消回调 /// private Action mAc_Cancel = null; /// /// 按钮布局:左 /// private Transform mLeft = null; /// /// 按钮布局:中 /// private Transform mMid = null; /// /// 按钮布局:右 /// private Transform mRight = null; /// /// 获取单键 /// /// 返回提示框实例 public static UI_CueDialog Instance() { return mInstance; } /// /// 初始化 /// private void Awake() { mInstance = this; mCueObj = transform.Find("GameObject").gameObject; mBG = transform.Find("GameObject/Panel/bg").gameObject; mTipsObj = transform.Find("TipsPanel").gameObject; mTitle = transform.Find("GameObject/Panel/title").gameObject.GetComponent(); mContent = transform.Find("GameObject/Panel/content").gameObject.GetComponent(); mTipsContent = transform.Find("TipsPanel/Panel/ContentText").gameObject.GetComponent(); mButtonConfirm = transform.Find("GameObject/Panel/ButtonConfirm").GetComponent