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