Esempio 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(); };
        }
Esempio n. 2
0
 private void OnWindowFocusChanged(object sender, EventArgs e)
 {
     if (NativeWindow.Focused)
     {
         FocusGained?.Invoke();
     }
     else
     {
         FocusLost?.Invoke();
     }
 }
Esempio 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);
        }
    }
Esempio n. 4
0
 protected virtual void OnFocusGained(object sender, LeapEventArgs eventArgs)
 {
     FocusGained.DispatchOnContext <LeapEventArgs> (this, EventContext, eventArgs);
 }
Esempio n. 5
0
 public virtual void OnFocusGained()
 {
     FocusGained?.Invoke(this);
 }
Esempio n. 6
0
 protected virtual void OnFocusGained() => FocusGained?.Invoke();