Exemplo n.º 1
0
        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(); };
        }
Exemplo n.º 2
0
 private void OnWindowFocusChanged(object sender, EventArgs e)
 {
     if (NativeWindow.Focused)
     {
         FocusGained?.Invoke();
     }
     else
     {
         FocusLost?.Invoke();
     }
 }
Exemplo n.º 3
0
    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);
        }
    }
Exemplo n.º 4
0
 protected virtual void OnFocusLost(object sender, LeapEventArgs eventArgs)
 {
     FocusLost.DispatchOnContext <LeapEventArgs> (this, EventContext, eventArgs);
 }
Exemplo n.º 5
0
 protected override void OnFocusLost(FocusLostEvent e)
 {
     base.OnFocusLost(e);
     FocusLost?.Invoke();
 }
Exemplo n.º 6
0
 public virtual void OnFocusLost()
 {
     FocusLost?.Invoke(this);
 }
Exemplo n.º 7
0
 public virtual void Dispose()
 {
     Owner = null;
     FocusLost?.Invoke(this, EventArgs.Empty);
 }
Exemplo n.º 8
0
 protected void OnFocusLost()
 {
     _hasFocus = false;
     FocusLost.InvokeAsync(null);
 }
Exemplo n.º 9
0
 protected virtual void OnFocusLost() => FocusLost?.Invoke();
Exemplo n.º 10
0
 protected virtual void OnFocusLost()
 {
     FocusLost?.Invoke(this, EventArgs.Empty);
 }