Exemple #1
0
        /// <inheritdoc />
        public IDialog DisplayAlert(DialogPriority priority, string title, string message, string cancel, string confirm, Action onConfirm = null, Action onCancel = null)
        {
            IDialog dialog = (DialogComponent)m_AlertDialogFactory.Create(title, message, cancel, confirm, onCancel, onConfirm);

            m_DialogService.SendRequest(DialogRequest.Create(dialog, priority));
            return(dialog);
        }
Exemple #2
0
        /// <inheritdoc />
        public IDialog DisplayActivity(DialogPriority priority, string message)
        {
            IDialog dialog = (DialogComponent)m_ActivityIndicatorDialogFactory.Create(message);

            m_DialogService.SendRequest(DialogRequest.Create(dialog, priority));
            return(dialog);
        }
        /// <summary>
        ///     Opens a new file dialog.
        /// </summary>
        /// <param name="fileSelected">Callback when file is selected.</param>
        /// <param name="targetPath">Target path at which to create the file.</param>
        /// <param name="fileType">Target filetype extension (*.ext).</param>
        /// <param name="dialogPriority">Dialog Priority. Higher values get displayed first.</param>
        /// <returns></returns>
        public NewFileDialogViewController Show(FileSelectedDelegate fileSelected, string targetPath, string fileType, DialogPriority dialogPriority = DialogPriority.High)
        {
            NewFileDialogViewController newFileDialog = m_Factory.Create(fileSelected, targetPath, fileType);
            DialogRequest request = DialogRequest.Create((DialogComponent)newFileDialog, dialogPriority);

            m_DialogService.SendRequest(request);
            return(newFileDialog);
        }
        /// <summary>
        ///     Opens a file selector dialog.
        /// </summary>
        /// <param name="fileSelected">Callback when file is selected.</param>
        /// <param name="filePaths">File directories to be searched</param>
        /// <param name="filters">Optional filters to be passed, e.g. extensions (*.ext)</param>
        /// <param name="dialogPriority">Dialog Priority. Higher values get displayed first.</param>
        /// <returns></returns>
        public FileSelectorViewController Show(FileSelectedDelegate fileSelected, IEnumerable <string> filePaths, IEnumerable <string> filters, DialogPriority dialogPriority = DialogPriority.High)
        {
            FileSelectorViewController fileSelector = m_Factory.Create(fileSelected, filePaths, filters);
            DialogRequest request = DialogRequest.Create((DialogComponent)fileSelector, dialogPriority);

            m_DialogService.SendRequest(request);
            return(fileSelector);
        }
Exemple #5
0
 public static DialogRequest Create(IDialog dialog, DialogPriority priority = DialogPriority.Medium)
 {
     return(Create(dialog, (int)priority));
 }
Exemple #6
0
    public void Show(int id, string text, string okButton, string cancelButton, DelegateButtonPressed buttonDelegate, DialogPriority priority)
    {
        GetComponent <UIPanel>().depth = ( int )priority + id;

        transform.position   = new Vector3(0, 0, 0);
        transform.localScale = new Vector3(1, 1, 1);

        GetComponent <UIWidget>().depth = 100 + id;

        ShowAnim.Play(true);
        gameObject.SetActive(true);

        Id = id;

        ButtonDelegate = buttonDelegate;

        SetLabel("Label_Text", text);
        SetLabel("Button_OK/Label", okButton);
        SetLabel("Button_Cancel/Label", cancelButton);

        SetDelegate("Button_OK", OnButtonOKPressed);
        SetDelegate("Button_Cancel", OnButtonCancelPressed);
    }