Exemple #1
0
 private void Show(string text, Color color, params object[] args)
 {
     if (args != null)
     {
         text = string.Format(text, args);
     }
     App.Current.Locator.DispatcherHelper.RunAsync(() => SnackbarManager.Show(new Snackbar(App.Current.CurrentActivity).Text(text).Color(color)));
 }
Exemple #2
0
        private void FixedUpdate()
        {
            if (RemainText != null)
            {
                RemainText.text = Statement.PmxFiles.Count.ToString();
            }

            if (IsReadingPmxs && dialogProgress == null)
            {
                dialogProgress = UIContainer.ShowDialog();
            }
            if (!IsReadingPmxs)
            {
                if (dialogProgress != null)
                {
                    dialogProgress.Hide();
                    dialogProgress = null;
                }
            }

            // Save rt since we can
            if (Statement.CanSaveRT && !Statement.IsSaving)
            {
                try
                {
                    SnackbarManager.Show("Saving " + Statement.PmxFiles[Statement.CurrentPmx] + ".png");
                }
                catch
                {
                }

                Statement.IsSaving = true;
                StartCoroutine(TakePhoto(1));
            }


            if (Statement.IsWorking)
            {
                inputField.GetComponent <MaterialInputField>().interactable = false;
                selectButton.GetComponent <MaterialButton>().interactable   = false;
                makeButton.GetComponent <MaterialButton>().interactable     = false;
            }
            else
            {
                inputField.GetComponent <MaterialInputField>().interactable = true;
                selectButton.GetComponent <MaterialButton>().interactable   = true;
            }

            if ((!Statement.IsWorking || !Statement.IsPreviewing) && Statement.CanMakePreview)
            {
                makeButton.GetComponent <MaterialButton>().interactable = true;
            }
            else
            {
                makeButton.GetComponent <MaterialButton>().interactable = false;
            }

            if (Statement.CanMakePreview && !Statement.IsSaving && Statement.IsWorking)
            {
                try
                {
                    CreatePmx();
                }
                catch
                {
                    ToastManager.Show(
                        $"Create {Path.GetFileNameWithoutExtension(Statement.PmxFiles[Statement.CurrentPmx])} Faild, make sure pmx is correct");
                    MoveNext();
                }

                // Take photo~ Update save rt statement
                Statement.CanSaveRT = true;
            }
        }
Exemple #3
0
 public void OnCustomSnackbarButtonClicked()
 {
     SnackbarManager.Show("Simple snackbar", 2.0f, GetRandomColor(), GetRandomColor(), Random.Range(12, 36), "Custom", () => { Debug.Log("Action clicked"); });
 }
Exemple #4
0
 public void OnSimpleSnackbarButtonClicked()
 {
     SnackbarManager.Show("Simple snackbar", "Action", () => { Debug.Log("Action clicked"); });
 }