Namespace: DeltaEngine.Input.Tests
Assembly: DeltaEngine.Input.Tests (in DeltaEngine.Input.Tests.dll) Version: 1.1.1.0 (1.1.1)
Assembly: DeltaEngine.Input.Tests (in DeltaEngine.Input.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Examples
[Test, CloseAfterFirstFrame] public void HoldMouseHovering() { var drawArea = new Rectangle(0.25f, 0.25f, 0.5f, 0.25f); var rect = new FilledRect(drawArea, Color.Blue); var trigger = new MouseHoldTrigger(drawArea); trigger.Invoked += () => rect.Color = Color.Red; trigger.Movement = new Vector2D(0.3f, 0.3f); Assert.IsFalse(trigger.IsHovering()); AdvanceTimeAndUpdateEntities(1.05f); Assert.IsFalse(trigger.IsHovering()); }
See Also