public void GainedGamepadFocus()
 {
     RecentlyGainedFocus     = true;
     HoveredSlot             = SlotBounds.First();
     HoveredContentsButton   = null;
     IsNavigatingWithGamepad = true;
 }
 public bool TryNavigate(NavigationDirection Direction, NavigationWrappingMode HorizontalWrapping, NavigationWrappingMode VerticalWrapping)
 {
     if (IsGamepadFocused && HoveredSlot == null)
     {
         HoveredSlot             = SlotBounds.First();
         IsNavigatingWithGamepad = HoveredSlot != null;
         return(HoveredSlot != null);
     }
     else if (TryGetSlotNeighbor(HoveredSlot, Direction, HorizontalWrapping, VerticalWrapping, out Rectangle? Neighbor))
     {
         HoveredSlot             = Neighbor.Value;
         IsNavigatingWithGamepad = true;
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemple #3
0
 public void GainedGamepadFocus()
 {
     RecentlyGainedFocus     = true;
     HoveredSlot             = SlotBounds.First().Value[ColumnType.RegularQuality];
     IsNavigatingWithGamepad = true;
 }