public SdlWindow(Sdl2Window window) { RawWindow = window; RawWindow.Closed += () => { Closed?.Invoke(); }; RawWindow.Resized += () => { Resized?.Invoke(); }; RawWindow.FocusLost += () => { FocusLost?.Invoke(); }; RawWindow.FocusGained += () => { FocusGained?.Invoke(); }; RawWindow.Closing += () => { Closing?.Invoke(); }; }
private void OnWindowFocusChanged(object sender, EventArgs e) { if (NativeWindow.Focused) { FocusGained?.Invoke(); } else { FocusLost?.Invoke(); } }
private void ChangeState(bool state) { Input.gameObject.SetActive(state); Label.gameObject.SetActive(!state); Activator.gameObject.SetActive(!state); if (state) { Input.ActivateInputField(); FocusGained?.Invoke(this); } else { FocusLost?.Invoke(this); } }
protected virtual void OnFocusGained(object sender, LeapEventArgs eventArgs) { FocusGained.DispatchOnContext <LeapEventArgs> (this, EventContext, eventArgs); }
public virtual void OnFocusGained() { FocusGained?.Invoke(this); }
protected virtual void OnFocusGained() => FocusGained?.Invoke();