Ejemplo n.º 1
0
        /// <summary>
        /// Show a dialog with passed content, defaulting to the general message dialog if no prefabName is passed.
        /// </summary>
        /// <param name="prefabName"></param>
        /// <param name="title"></param>
        /// <param name="titleKey"></param>
        /// <param name="text"></param>
        /// <param name="textKey"></param>
        /// <param name="text2"></param>
        /// <param name="text2Key"></param>
        /// <param name="sprite"></param>
        /// <param name="doneCallback"></param>
        /// <param name="dialogButtons"></param>
        /// <returns></returns>
        public DialogInstance Show(string prefabName = null, string title = null, string titleKey = null, string text = null, string textKey = null, string text2 = null, string text2Key = null, Sprite sprite = null, Action <DialogInstance> doneCallback = null, DialogInstance.DialogButtonsType dialogButtons = DialogInstance.DialogButtonsType.Ok)
        {
            var dialogInstance = Create(prefabName);

            dialogInstance.Show(title, titleKey, text, textKey, text2, text2Key, sprite, doneCallback, dialogButtons: dialogButtons);
            return(dialogInstance);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Show a dialog one time only using the specified dialog as a key for identifying this instance.
        /// </summary>
        /// <param name="dialogKey"></param>
        /// <param name="prefab"></param>
        /// <param name="title"></param>
        /// <param name="titleKey"></param>
        /// <param name="text"></param>
        /// <param name="textKey"></param>
        /// <param name="text2"></param>
        /// <param name="text2Key"></param>
        /// <param name="sprite"></param>
        /// <param name="doneCallback"></param>
        /// <param name="dialogButtons"></param>
        /// <returns></returns>
        public DialogInstance ShowOnce(string dialogKey, string prefab = null, string title = null, string titleKey = null, string text = null, string textKey = null, string text2 = null, string text2Key = null, Sprite sprite = null, Action <DialogInstance> doneCallback = null, DialogInstance.DialogButtonsType dialogButtons = DialogInstance.DialogButtonsType.Ok)
        {
            // show hint panel first time only
            if (PreferencesFactory.GetInt("GeneralMessage." + dialogKey, 0) == 0)
            {
                PreferencesFactory.SetInt("GeneralMessage." + dialogKey, 1);
                PreferencesFactory.Save();

                return(Show(prefab, title, titleKey, text, textKey, text2, text2Key, sprite, doneCallback, dialogButtons));
            }
            return(null);
        }
Ejemplo n.º 3
0
        public DialogInstance Show(string prefab = null, string title = null, string titleKey = null, string text = null, string textKey = null, string text2 = null, string text2Key = null, Sprite sprite = null, System.Action <DialogInstance> doneCallback = null, DialogInstance.DialogButtonsType dialogButtons = DialogInstance.DialogButtonsType.Ok)
        {
            DialogInstance generalMessage = Create(prefab);

            generalMessage.Show(title, titleKey, text, textKey, text2, text2Key, sprite, doneCallback, dialogButtons: dialogButtons);
            return(generalMessage);
        }