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