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(); }
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); } } }
private Task OnClickConfirm() { if (OnConfirm != null) { OnConfirm.Invoke(); } return(Task.CompletedTask); }
private void YesBtn_Click(object sender, RoutedEventArgs e) { OnConfirm?.Invoke(this); if (BrowserFlag == BrowserFlags.CONFIRM) { _ = LoadHeaderAsync(); } }
//--------------------------------------------------------------------------------------------- public void Accept() { OnConfirm?.Invoke(); canvas.interactable = false; canvas.alpha = 0f; canvas.blocksRaycasts = false; }
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(); }
/// <summary> /// 点击确认按钮时回调此方法 /// </summary> private async Task OnClickConfirm() { Value = CurrentTime; if (ValueChanged.HasDelegate) { await ValueChanged.InvokeAsync(Value); } OnConfirm?.Invoke(); }
public void Publish(string sceneName, string sceneDescription) { if (!isValidated) { return; } SetActive(false); OnConfirm?.Invoke(); }
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(); } }
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); }
public void Confirm() { OnConfirm?.Invoke(); }
private void BtnConfirm_Click(object sender, RoutedEventArgs e) { OnConfirm.Invoke(sender, hexColor); Close(); }
private void btnConfirm_Click(object sender, EventArgs e) { OnConfirm?.Invoke(colors.ToArray()); btnClear.PerformClick(); }
private void OnPopupConfirm() { UnregisterEvents(); OnConfirm?.Invoke(_inputMenu.GetInputText()); }
/// <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(); }
private void Internal_onConfirm(VectorComponent p0) { OnConfirm?.Invoke(p0); }
private void Confirm(object parameter) { OnConfirm?.Invoke(ServerName); }
private void Confirm(object parameter) { OnConfirm?.Invoke(Model); }
private void Confirm(object parameter) { OnConfirm?.Invoke(MyDatabase); }
private void OnPopupConfirm() { UnregisterEvents(); OnConfirm?.Invoke(_inputMenu.Combination); }
public void Confirm() { OnConfirm?.Invoke(_actionId); HideConfirmModal(); }
protected override void OnSave() { OnConfirm?.Invoke(GenerateCombination()); base.OnSave(); }
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(); }
private void Confirm(object parameter) { OnConfirm?.Invoke(SelectedItem); }