Пример #1
0
            protected override void Confirm()
            {
                if (textField.InputOpen)
                {
                    textMember.SetValueText(textField.TextBoard.ToString());
                }

                textField.CloseInput();
                CloseWidgetCallback?.Invoke();
            }
Пример #2
0
            protected override void Confirm()
            {
                if (comboBox.SelectionIndex != -1)
                {
                    blockComboMember.Value = comboBox.SelectionIndex;
                }

                comboBox.CloseList();
                CloseWidgetCallback?.Invoke();
            }
Пример #3
0
            protected override void Cancel()
            {
                if (!sliderBox.IsTextInputOpen)
                {
                    floatMember.Value = initValue;
                }
                else
                {
                    sliderBox.CloseTextInput();
                }

                CloseWidgetCallback?.Invoke();
            }
Пример #4
0
            protected override void Confirm()
            {
                if (sliderBox.IsTextInputOpen)
                {
                    float newValue;

                    if (float.TryParse(sliderBox.FieldText.ToString(), out newValue))
                    {
                        floatMember.Value = newValue;
                    }

                    sliderBox.CloseTextInput();
                }

                CloseWidgetCallback?.Invoke();
            }