static void OnFocusOut(this IRenamable renamable, FocusOutEvent evt) { VseWindow window = renamable.TitleElement.GetFirstAncestorOfType <VseGraphView>()?.window; if (window != null) { window.RefreshUIDisabled = false; } renamable.TitleEditor.UnregisterCallback <FocusEvent>(renamable.OnFocus); renamable.TitleEditor.UnregisterCallback <FocusOutEvent>(renamable.OnFocusOut); renamable.TitleEditor.Q(TextInputBaseField <string> .textInputUssName).UnregisterCallback <KeyDownEvent>(OnKeyPressed); // ReSharper disable once DelegateSubtraction Undo.undoRedoPerformed -= renamable.UndoRedoPerformed; renamable.TitleEditor.RemoveFromHierarchy(); if (!renamable.EditTitleCancelled) { if (renamable.TitleEditor is TextField textField && renamable.TitleValue != textField.text) { renamable.Store.Dispatch(new RenameElementAction((IRenamableModel)renamable.GraphElementModel, textField.text)); } } else { renamable.EditTitleCancelled = false; } }
void OnTitleBlur(FocusOutEvent e) { title = m_TitleField.value; m_TitleField.style.display = DisplayStyle.None; controller.title = title; }
/// <summary> /// Called when the hex field updates /// </summary> /// <param name="evt"></param> private void UpdateColorFromHex(FocusOutEvent evt) { UpdatePrevColor(); // make sure the color string starts with a # string colorString = _hexField.value; if (!colorString.StartsWith("#")) { colorString = colorString.Insert(0, "#"); } // if the string is not valid, reset to the previous color if (!UnityEngine.ColorUtility.TryParseHtmlString(colorString, out Color colorFromHex)) { _hexField.SetValueWithoutNotify(UnityEngine.ColorUtility.ToHtmlStringRGB(_currentColor)); return; } // set color _currentColor = colorFromHex; // update display UpdateColorComparisionSwatch(); UpdateHslWheel(); UpdateSliders(); OnColorChanged?.Invoke(_currentColor); }
void OnTitleBlur(FocusOutEvent e) { title = m_TitleField.value; m_TitleField.visible = false; VFXView view = GetFirstAncestorOfType <VFXView>(); controller.title = title; }
private void OnSearchTextFieldFocusOut(FocusOutEvent evt) { if (string.IsNullOrEmpty(searchText)) { showingPlaceHolder = true; SearchTextField.AddToClassList("placeholder"); SearchTextField.value = kPlaceHolder; } }
private void OnLostFocus(FocusOutEvent evt) { if (evt.relatedTarget == null) { return; } hasFocus = false; UpdateVisibility(); }
void OnTitleBlur(FocusOutEvent e) { title = m_TitleField.value; m_TitleField.style.display = DisplayStyle.None; VFXView view = GetFirstAncestorOfType <VFXView>(); controller.title = title; }
void OnFocusOut(FocusOutEvent evt) { if (!IsCompletionContainerVisible || !(evt.relatedTarget is VisualElement ve) || !m_CompletionContainer.Contains(ve) && !m_TextField.Contains(ve)) { m_CompletionContainer.Hide(); } }
private void UpdateBorderField(FocusOutEvent evt) { if (hasSelected) { m_BorderFieldL.SetValueWithoutNotify((int)selectedSpriteBorder.x); m_BorderFieldB.SetValueWithoutNotify((int)selectedSpriteBorder.y); m_BorderFieldR.SetValueWithoutNotify((int)selectedSpriteBorder.z); m_BorderFieldT.SetValueWithoutNotify((int)selectedSpriteBorder.w); } }
protected void UpdatePositionField(FocusOutEvent evt) { if (hasSelected) { m_PositionFieldX.SetValueWithoutNotify((int)selectedSpriteRect.x); m_PositionFieldY.SetValueWithoutNotify((int)selectedSpriteRect.y); m_PositionFieldW.SetValueWithoutNotify((int)selectedSpriteRect.width); m_PositionFieldH.SetValueWithoutNotify((int)selectedSpriteRect.height); } }
void OnFocusOut(FocusOutEvent evt) { var focusedElement = evt.relatedTarget as VisualElement; if (focusedElement?.FindCommonAncestor(m_ListView) != m_ListView && focusedElement?.FindCommonAncestor(this) != this) { Hide(); UpdateTextHint(); m_IsFocused = false; } else { m_MenuContainer.schedule.Execute(Focus); } }
void OnTitleBlur(FocusOutEvent e) { controller.model.label = m_TextField.value .Trim() .Replace("/", "") .Replace("\\", "") .Replace(":", "") .Replace("<", "") .Replace(">", "") .Replace("*", "") .Replace("?", "") .Replace("\"", "") .Replace("|", "") ; m_TextField.style.display = DisplayStyle.None; }
private void BoneDepthFocusChanged(FocusOutEvent evt) { onBoneDepthChanged(target, boneDepth); }
private void OnFocusOutEvent(FocusOutEvent e) { ClearLabels(); m_TextField.value = (string)m_Property.GetValue(m_Node); }
private void OnMultiLineFocusOut(FocusOutEvent evt) { SaveMultiLineState(); }
private void BoneNameFocusChanged(FocusOutEvent evt) { onBoneNameChanged(target, boneName); }
private void OnidTextFieldFocusOut(FocusOutEvent evt) { Hide(); }
void OnFocusOutEvent(FocusOutEvent evt) { m_HardwareKeyboardPoller?.Pause(); editingUtilities.OnBlur(); }
void OnTextFieldLostFocus(FocusOutEvent evt) { ApplyEditing(); }
private void OnContainerFocusOut(FocusOutEvent evt) { Hide(); }
static void OnFocusOutEvent(FocusOutEvent evt) { OnEditTextFinished(); }
void OnFocusOutEvent(FocusOutEvent evt) { m_HardwareKeyboardPoller?.Pause(); }
private void OnLostFocusIntField(FocusOutEvent evt) { StripShaderConfig.Order = this.orderIntField.value; }