public virtual void FocusOn(UIActionEvent e) { IsFocused = true; OnFocused?.Invoke(e, this); if (PropagationRule.HasFlag(PropagationFlags.FocusOn)) { Parent?.FocusOn(e); } }
public void ShowOptions(object sender, EventArgs e) { if (OptionsMenu == null) { OptionsMenu = OptionsPrefab; TriggerAreas.Add(OptionsMenu.TriggerAreas[0]); OnFocused?.Invoke(this, new NodeEventArgs(OptionsMenu)); FocusedNode?.OnUnfocused?.Invoke(this, new NodeEventArgs(FocusedNode)); TriggerAreas.Add(OptionsMenu.TriggerAreas[0]); } else { OnOptionsHide?.Invoke(this, e); } }
public void Focus() { if (IsFocused) { return; } IsFocused = true; _focusableObjects.ForEach(o => o.Focus()); OnFocused?.Invoke(this, null); SetFocusStyle(); }
private static void Update() { var isApplicationActive = InternalEditorUtility.isApplicationActive; if (!m_isFocused && isApplicationActive) { m_isFocused = true; OnFocused?.Invoke(); ; } else if (m_isFocused && !isApplicationActive) { m_isFocused = false; OnUnfocused?.Invoke(); } }
/// <summary> /// Focus the given input focus target. /// </summary> public override void Focus(IInputFocus target) { if (target == CurrentInputFocus) { return; } CurrentInputFocus = target; if (string.IsNullOrEmpty(target.ActionMapName) == false) { playerInput.SwitchCurrentActionMap(target.ActionMapName); } target.OnFocus(); OnFocused?.Invoke(this, new InputFocusEventArgs(target)); }
/// <summary> /// Notifies the focus. /// </summary> /// <param name="touchPoint">Touch point.</param> public void NotifyFocus(Point touchPoint) { OnFocused?.Invoke(this, touchPoint); }
public virtual void Focus() { Focused = true; OnFocused?.Invoke(this); Parent?.Focus(); }
private void Tpanel_Enter(object sender, EventArgs e) { OnFocused?.Invoke(this); }