Exemple #1
0
    public static void Popup()
    {
#if US_VERSION
        DialogManager.Instance.PopupDialog(CommonAsset.Load("prefabs/Dialogs/PauseGameDialog_us"));
#else
        DialogManager.Instance.PopupDialog(CommonAsset.Load("prefabs/Dialogs/PauseGameDialog"));
#endif
    }
Exemple #2
0
    public GameObject PopupNotificationDialog(string prefab, GameObject sender = null, bool instant = true)
    {
        GameObject go = NGUITools.AddChild(gameObject, CommonAsset.Load(prefab) as GameObject);

        if (go.GetComponent <DialogBase>() != null)
        {
            go.GetComponent <DialogBase>().style = DialogStyle.NotificationDialog;
        }
        PushDialog(go, sender, instant);

        return(go);
    }
Exemple #3
0
    public GameObject PopupNotificationDialog <T>(string prefab, T param, bool instant = true) where T : DialogParam
    {
        GameObject go = NGUITools.AddChild(gameObject, CommonAsset.Load(prefab) as GameObject);

        if (go.GetComponent <DialogBase>() != null)
        {
            go.GetComponent <DialogBase>().style = DialogStyle.NotificationDialog;
        }
        PushDialog(go, param, instant);

        return(go);
    }
Exemple #4
0
    // Use this for initialization
    void Start()
    {
        _instance = this;

        messagePrefab = CommonAsset.Load("UI/debugMsg") as GameObject;

        maskPanel = NGUITools.AddChild(gameObject);
        maskPanel.AddComponent <UIPanel>();
        maskPanel.AddComponent <UIStretch>().style = UIStretch.Style.Both;
        maskPanel.AddComponent <BoxCollider>();
        var tex = maskPanel.AddComponent <UIWidget>();

        tex.autoResizeBoxCollider = true;
        tex.color = Color.black;
        maskPanel.SetActive(false);
    }
Exemple #5
0
 public GameObject PopupDialog <T>(string prefab, T param, bool instant = true) where T : DialogParam
 {
     return(PopupDialog(CommonAsset.Load(prefab) as GameObject, param, instant));
 }
Exemple #6
0
 public GameObject PopupDialog(string prefab, bool instant = true, GameObject sender = null)
 {
     return(PopupDialog(CommonAsset.Load(prefab), instant, sender));
 }