Ejemplo n.º 1
0
 public void IsHovering()
 {
     var trigger = new TouchHoldTrigger(Rectangle.One, 0.5f);
     Assert.IsFalse(trigger.IsHovering());
     trigger.Elapsed = 1f;
     Assert.IsFalse(trigger.IsHovering());
 }
        public void IsHovering()
        {
            var trigger = new TouchHoldTrigger(Rectangle.One, 0.5f);

            Assert.IsFalse(trigger.IsHovering());
            trigger.Elapsed = 1f;
            Assert.IsFalse(trigger.IsHovering());
        }
Ejemplo n.º 3
0
 public void PessingInTheSamePositionWillMakeTriggerHover()
 {
     var trigger = new TouchHoldTrigger(Rectangle.One, 0.0001f);
     new Command(() => { }).Add(trigger);
     SetTouchState(State.Pressing, Vector2D.Half);
     SetTouchState(State.Pressed, Vector2D.Half);
     SetTouchState(State.Releasing, Vector2D.Half);
     Assert.IsTrue(trigger.IsHovering());
 }
        public void PessingInTheSamePositionWillMakeTriggerHover()
        {
            var trigger = new TouchHoldTrigger(Rectangle.One, 0.0001f);

            new Command(() => { }).Add(trigger);
            SetTouchState(State.Pressing, Vector2D.Half);
            SetTouchState(State.Pressed, Vector2D.Half);
            SetTouchState(State.Releasing, Vector2D.Half);
            Assert.IsTrue(trigger.IsHovering());
        }