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 }
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); }
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); }
// 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); }
public GameObject PopupDialog <T>(string prefab, T param, bool instant = true) where T : DialogParam { return(PopupDialog(CommonAsset.Load(prefab) as GameObject, param, instant)); }
public GameObject PopupDialog(string prefab, bool instant = true, GameObject sender = null) { return(PopupDialog(CommonAsset.Load(prefab), instant, sender)); }