Exemple #1
0
    private static IEnumerator ActivateDialog(string dialogName)
    {
        Dialog dialogInstance = Dialog.Instance(dialogName);

        if (dialogInstance == null)
        {
            yield break;
        }

        yield return(dialogInstance.Activate(
                         "<color=#ff000088>Now</color> is the time for all good <b>men</b> to come to the aid of the <i>party</i>",
                         "Yes Sir",
                         "Not Now"));

        Debug.Log("Button pressed - " + dialogInstance.Action);

        switch (dialogInstance.Action)
        {
        case "Yes":
            Debug.Log(message: "Affirmative");
            break;

        case "No":
            Debug.Log(message: "Negative");
            break;

        default:
            Debug.LogError(message: "Unexpected button: '" + dialogInstance.Action + "'");
            break;
        }
    }
Exemple #2
0
 /// <summary>
 /// Shows this instance of FindReplaceDialog, with the Replace page active
 /// </summary>
 public void ShowAsReplace()
 {
     Dialog.tabMain.SelectedIndex = 1;
     Dialog.Show();
     Dialog.Activate();
     Dialog.txtFind2.Focus();
 }
Exemple #3
0
 /// <summary>
 /// Shows this instance of FindReplaceDialog, with the Find page active
 /// </summary>
 public void ShowAsFind()
 {
     Dialog.tabMain.SelectedIndex = 0;
     Dialog.Show();
     Dialog.Activate();
     Dialog.txtFind.Focus();
 }
Exemple #4
0
 public void DestroyButtons()
 {
     DialogButton[] Buttons = transform.parent.gameObject.GetComponentsInChildren <DialogButton>();
     foreach (DialogButton choice in Buttons)
     {
         Destroy(choice.gameObject);
     }
     connectedDialog.Activate();
 }
Exemple #5
0
 public void OnTriggerEnter(Collider col)
 {
     if (col.gameObject == player)
     {
         if (aDialog)
         {
             aDialog.Activate();
         }
         triggerActive = true;
     }
 }
Exemple #6
0
        /// <summary>
        /// Shows this instance of FindReplaceDialog, with the Replace page active
        /// </summary>
        public void ShowAsReplace()
        {
            Dialog.tabMain.SelectedIndex = 1;

            SetDefaultSearchedText(Dialog.txtFind2);

            Dialog.Show();
            Dialog.Activate();
            Dialog.txtFind2.Focus();
            Dialog.txtFind2.SelectAll();
        }
Exemple #7
0
        /// <summary>
        /// Shows this instance of FindReplaceDialog, with the Find page active
        /// </summary>
        public void ShowAsFind()
        {
            Dialog.tabMain.SelectedIndex = 0;

            SetDefaultSearchedText(Dialog.txtFind);

            Dialog.Show();
            Dialog.Activate();
            Dialog.txtFind.Focus();
            Dialog.txtFind.SelectAll();
        }
        public void Execute()
        {
            Shell.MainMenu.ClickToolsMenu();
            Shell.MainMenu.ConnectToServiceControl.Click();

            Dialog.Activate();
            Dialog.ServiceUrl.Focus();
            Keyboard.Enter("http://" + FakeServiceControl.Address);
            Keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.DELETE); //NOTE: To delete any auto-completed text on the dropdown
            Dialog.Okay.Click();

            Wait.For(() => Dialog.IsClosed.ShouldBe(true));
        }
Exemple #9
0
 private void SplashDialog(string message)
 {
     doneshowingSplash = false;
     ThreadPool.QueueUserWorkItem((_) =>
     {
         using (var splashForm = new Dialog())
         {
             splashForm.TopMost = true;
             splashForm.Focus();
             splashForm.Activate();
             splashForm.Message  = message;
             splashForm.Location = new Point(this.Location.X + ((this.Width - splashForm.Width) / 2), this.Location.Y + ((this.Height - splashForm.Height) / 2));
             splashForm.Show();
             while (!doneshowingSplash)
             {
                 Application.DoEvents();
             }
             splashForm.Close();
         }
     });
 }
Exemple #10
0
    void ChooseGameEnding(string gameEnding)
    {
        int gameEndID = int.Parse(gameEnding);

        Debug.Log("Game end: " + gameEndID);

        endingImg.enabled = true;
        endingImg.sprite  = endingSprites [gameEndID];

        endingDialog.npcDialogStarter = endingResponses[gameEndID];
        endingDialog.Activate();

        ResponseManager.instance.onDialogEnded += GameEnd;

        if (gameEndID == 3)
        {
            onGameEnd(true);
        }
        else
        {
            onGameEnd(false);
        }
    }
Exemple #11
0
        public override void Activate()
        {
            Dialog.Activate();

            base.Activate();
        }