Beispiel #1
0
        protected override void Start()
        {
            base.Start();

            var souvenirBar     = transform.FindChild(Constants.SouvenirBar);
            var confirmationBar = transform.FindChild(Constants.ConfirmationBar);

            // Gets the holobar buttons
            adjustButton  = souvenirBar.FindChild(Constants.AdjustButton).gameObject.GetComponent <HoloBarButton>();
            cancelButton  = confirmationBar.FindChild(Constants.CancelButton).gameObject.GetComponent <HoloBarButton>();
            confirmButton = confirmationBar.FindChild(Constants.ConfirmButton).gameObject.GetComponent <HoloBarButton>();

            // Attaches the clicked events to the buttons
            adjustButton.Clicked  += () => { RaiseIfNotInConfirmationState(AdjustClicked); };
            cancelButton.Clicked  += () => { CancelClicked.RaiseEvent(); };
            confirmButton.Clicked += () => { ConfirmClicked.RaiseEvent(); };

            // Sets up the voice commands
            keywords.Add(VoiceCommandsManager.AdjustKeyword, () => { RaiseIfNotInConfirmationState(AdjustClicked); });
            keywords.Add(VoiceCommandsManager.CancelKeyword, () => { CancelClicked.RaiseEvent(); });
            keywords.Add(VoiceCommandsManager.ConfirmKeyword, () => { ConfirmClicked.RaiseEvent(); });

            // Attaches the holobar flow methods to the buttons
            AdjustClicked  += () => { ChangeBar(Constants.ConfirmationBar); };
            CancelClicked  += () => { ChangeBar(Constants.SouvenirBar); };
            ConfirmClicked += () => { ChangeBar(Constants.SouvenirBar); };
        }
Beispiel #2
0
        private void OnConfirmClicked()
        {
            Hide();

            var characterName = nameInputField.text;

            ConfirmClicked?.Invoke(characterName);

            ResetNameInputField();
        }
        private void ConfirmButton_Clicked(object sender, EventArgs e)
        {
            this.Hide();

            if (ConfirmCommand != null)
            {
                if (ConfirmCommand.CanExecute(null))
                {
                    ConfirmCommand.Execute(null);
                }
            }
            else if (ConfirmClicked != null)
            {
                ConfirmClicked.Invoke(null, null);
            }
        }
Beispiel #4
0
 private void confirmButton_Click(object sender, RoutedEventArgs e)
 {
     ConfirmClicked?.Invoke(loginTextBox.Text, passTextBox.Password, twofacorTextBox.Text);
 }
 private void ConfirmButton_Click(object sender, EventArgs e)
 {
     ConfirmClicked?.Invoke(this, e);
 }