コード例 #1
0
 public void ReleaseFocus(IFocusElement element)
 {
     if (this.IsFocused(element))
     {
         this.SetFocus(null);
     }
 }
コード例 #2
0
        public void SetFocus(IFocusElement element)
        {
            this.CurrentFocus?.UpdateJoystickInfo(this.lastJoystickInfo, new JoystickInfo());
            this.CurrentFocus?.LostFocus();
            this.CurrentFocus = element ?? this.DefaultFocus ?? throw new InvalidOperationException("CurrentFocus is null!");
            this.CurrentFocus.GotFocus();

            this.onScreenMenu.SetContextMenu(this.CurrentFocus.ContextMenu);
        }
コード例 #3
0
 public bool IsFocused(IFocusElement element)
 {
     return(this.CurrentFocus?.Equals(element) ?? false);
 }