public void OnGUI()
        {
            EditorGUILayout.BeginVertical();
            GUILayout.Label(_QuestionText, _WordWrapStyle, GUILayout.ExpandWidth(true));
            GUILayout.FlexibleSpace();

            GUILayout.BeginHorizontal();
            GUILayout.Space(10);
            if (GUILayout.Button("Yes"))
            {
                OnConfirm?.Invoke();
                OnButton?.Invoke(true);
                Close();
            }
            GUILayout.Space(10);

            if (GUILayout.Button("No"))
            {
                OnButton?.Invoke(false);
                Close();
            }
            GUILayout.Space(10);

            GUILayout.EndHorizontal();
            GUILayout.Space(10);
            EditorGUILayout.EndVertical();
        }
Esempio n. 2
0
        private void Update()
        {
            if (interactionsEnabled)
            {
                if (interactionsCooling)
                {
                    interactionsCooling = false;
                    return;
                }

                if (Input.GetButtonDown(KeyCodeConsts.Use))
                {
                    OnConfirm?.Invoke(INPUT_TYPE.USE);
                    interactionController.Interact();
                }

                if (Input.GetButtonDown(KeyCodeConsts.Cancel))
                {
                    OnCancel?.Invoke(INPUT_TYPE.CANCEL);
                    interactionController.Cancel();
                }

                if (Input.GetButtonDown(KeyCodeConsts.Inventory))
                {
                    OnInventory?.Invoke(INPUT_TYPE.INVENTORY);
                }
            }
        }
Esempio n. 3
0
 private Task OnClickConfirm()
 {
     if (OnConfirm != null)
     {
         OnConfirm.Invoke();
     }
     return(Task.CompletedTask);
 }
Esempio n. 4
0
 private void YesBtn_Click(object sender, RoutedEventArgs e)
 {
     OnConfirm?.Invoke(this);
     if (BrowserFlag == BrowserFlags.CONFIRM)
     {
         _ = LoadHeaderAsync();
     }
 }
Esempio n. 5
0
    //---------------------------------------------------------------------------------------------

    public void Accept()
    {
        OnConfirm?.Invoke();

        canvas.interactable   = false;
        canvas.alpha          = 0f;
        canvas.blocksRaycasts = false;
    }
Esempio n. 6
0
        private void confirmBtn_Click(object sender, EventArgs e)
        {
            //if (MessageBox.Show("Are you sure you want to add this item in cart?","", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.Cancel)
            //    return;
            var i = new InventoryItemDetailArgs(Id, (int)(quantity.Value), price.Value, discount.Value);

            OnConfirm.Invoke(this, i);
            this.Close();
        }
Esempio n. 7
0
 /// <summary>
 /// 点击确认按钮时回调此方法
 /// </summary>
 private async Task OnClickConfirm()
 {
     Value = CurrentTime;
     if (ValueChanged.HasDelegate)
     {
         await ValueChanged.InvokeAsync(Value);
     }
     OnConfirm?.Invoke();
 }
Esempio n. 8
0
    public void Publish(string sceneName, string sceneDescription)
    {
        if (!isValidated)
        {
            return;
        }

        SetActive(false);
        OnConfirm?.Invoke();
    }
Esempio n. 9
0
        public virtual void PerformConfirm(Func <object> resultSelector)
        {
            var cont = new ContinuityDelegate();

            OnConfirm?.Invoke(new FormResult(resultSelector(), this), cont);

            if (!string.IsNullOrEmpty(cont.Message))
            {
                ShowMessage(cont.Message, cont.MessageType, cont.Duration);
            }

            if (cont.Close)
            {
                Close();
            }
        }
Esempio n. 10
0
    public void Confirm()
    {
        StringBuilder userCode = new StringBuilder(password.Length);

        for (int i = 0; i < passwordContainers.Length; i++)
        {
            userCode.Append(passwordContainers[i].text);
        }

        if (password == userCode.ToString())
        {
            Debug.Log("CODE CORRECT");
            for (int i = 0; i < rewards.Length; i++)
            {
                GameController.Instance.NormalInventory.AddToInventory(rewards[i]);
            }
            HidePuzzle();
            OnConfirm?.Invoke(this, true);
            return;
        }

        OnConfirm?.Invoke(this, false);
    }
Esempio n. 11
0
 public void Confirm()
 {
     OnConfirm?.Invoke();
 }
 private void BtnConfirm_Click(object sender, RoutedEventArgs e)
 {
     OnConfirm.Invoke(sender, hexColor);
     Close();
 }
Esempio n. 13
0
 private void btnConfirm_Click(object sender, EventArgs e)
 {
     OnConfirm?.Invoke(colors.ToArray());
     btnClear.PerformClick();
 }
Esempio n. 14
0
 private void OnPopupConfirm()
 {
     UnregisterEvents();
     OnConfirm?.Invoke(_inputMenu.GetInputText());
 }
Esempio n. 15
0
 /// <summary>
 /// 点击确认按钮调用此方法
 /// </summary>
 public void OnConfirmClick()
 {
     PopoverService?.Hide();
     OnConfirm?.Invoke();
 }
    public PartyAlignmentUi()
    {
        var doc = WidgetDoc.Load("ui/party_creation/party_alignment.json");

        _container         = doc.GetRootContainer();
        _container.Visible = false;

        // RENDER: 0x1011be20
        // MESSAGE: 0x1011ed20
        _container.SetKeyStateChangeHandler(evt =>
        {
            if (evt.key == DIK.DIK_ESCAPE && evt.down)
            {
                Cancel();
                return(true);
            }

            return(false);
        });

        // Alignment buttons:
        // MESSAGE: 0x1011e5c0
        // RENDER: 0x1011e460
        _alignmentButtons = new Dictionary <Alignment, WidgetButton>
        {
            { Alignment.TRUE_NEUTRAL, doc.GetButton("alignment_tn") },
            { Alignment.LAWFUL_NEUTRAL, doc.GetButton("alignment_ln") },
            { Alignment.CHAOTIC_NEUTRAL, doc.GetButton("alignment_cn") },
            { Alignment.NEUTRAL_GOOD, doc.GetButton("alignment_ng") },
            { Alignment.LAWFUL_GOOD, doc.GetButton("alignment_lg") },
            { Alignment.CHAOTIC_GOOD, doc.GetButton("alignment_cg") },
            { Alignment.NEUTRAL_EVIL, doc.GetButton("alignment_ne") },
            { Alignment.LAWFUL_EVIL, doc.GetButton("alignment_le") },
            { Alignment.CHAOTIC_EVIL, doc.GetButton("alignment_ce") }
        };
        foreach (var(alignment, button) in _alignmentButtons)
        {
            var alignmentName = GameSystems.Stat.GetAlignmentName(alignment).ToUpper();
            button.Text = alignmentName;

            button.SetClickHandler(() => SelectAlignment(alignment));
        }

        // OK Button:
        // MESSAGE: 0x1011bf70
        // RENDER: 0x1011beb0
        _okButton = doc.GetButton("ok");
        _okButton.SetClickHandler(() =>
        {
            var alignment = _alignment;
            if (alignment.HasValue)
            {
                Hide();
                OnConfirm?.Invoke(alignment.Value);
            }
        });

        // Cancel button: 0x10bdd614
        // MESSAGE: 0x1011ed50
        // RENDER: 0x1011bfa0
        var cancelButton = doc.GetButton("cancel");

        cancelButton.SetClickHandler(Cancel);

        _selectionRect = doc.GetImageContent("selected");
    }
 private void AutoConfirm()
 {
     OnConfirm?.Invoke();
 }
Esempio n. 18
0
 private void Internal_onConfirm(VectorComponent p0)
 {
     OnConfirm?.Invoke(p0);
 }
 private void Confirm(object parameter)
 {
     OnConfirm?.Invoke(ServerName);
 }
Esempio n. 20
0
 private void Confirm(object parameter)
 {
     OnConfirm?.Invoke(Model);
 }
Esempio n. 21
0
 private void Confirm(object parameter)
 {
     OnConfirm?.Invoke(MyDatabase);
 }
Esempio n. 22
0
 private void OnPopupConfirm()
 {
     UnregisterEvents();
     OnConfirm?.Invoke(_inputMenu.Combination);
 }
Esempio n. 23
0
 public void Confirm()
 {
     OnConfirm?.Invoke(_actionId);
     HideConfirmModal();
 }
Esempio n. 24
0
 protected override void OnSave()
 {
     OnConfirm?.Invoke(GenerateCombination());
     base.OnSave();
 }
Esempio n. 25
0
        public PopupAlertMessage(CompositeSpriteText title, CompositeSpriteText message, AlertMessageType alertMessageType = AlertMessageType.AcceptCancel) : base(true)
        {
            Background = new Sprite("Interface/Popup/Blue/Alert/Background", layerDepth: DepthParameter.InterfacePopupMessageBackground);

            compositeSpriteTextList.Add(title);
            compositeSpriteTextList.Add(message);

            title.PositionOffset   = Background.Position - new Vector2(186, 50);
            message.PositionOffset = Background.Position - new Vector2(186, 50 - title.ElementDimensions.Y - 5);

            buttonList.Add(new Button(ButtonType.Cancel, DepthParameter.InterfacePopupMessageButtons, CloseAction, PositionOffset + new Vector2(160, 65)));

            if (alertMessageType != AlertMessageType.Cancel)
            {
                buttonList.Add(new Button(ButtonType.Accept, DepthParameter.InterfacePopupMessageButtons, (sender) => { OnConfirm?.Invoke(sender); }, PositionOffset + new Vector2(125, 65)));
            }

            ShouldRender = true;

            UpdateAttatchmentPosition();
        }
Esempio n. 26
0
 private void Confirm(object parameter)
 {
     OnConfirm?.Invoke(SelectedItem);
 }