Exemple #1
0
 public bool IsHovering()
 {
     if (Elapsed >= HoldTime || !HoldArea.Contains(Position))
     {
         return(false);
     }
     Elapsed += Time.Delta;
     return(Elapsed >= HoldTime);
 }
Exemple #2
0
 private bool CheckHoverState(Touch touch)
 {
     return(HoldArea.Contains(startPosition) &&
            touch.GetState(0) == State.Pressed &&
            startPosition.DistanceTo(touch.GetPosition(0)) < PositionEpsilon);
 }
Exemple #3
0
 private bool CheckHoverState(Mouse mouse)
 {
     return(HoldArea.Contains(StartPosition) &&
            mouse.GetButtonState(Button) == State.Pressed &&
            StartPosition.DistanceTo(mouse.Position) < PositionEpsilon);
 }