Native mouse implementation using a windows hook and invokes.
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Entities UpdateBehavior
DeltaEngine.Input InputDevice
DeltaEngine.Input Mouse
DeltaEngine.Input.Windows WindowsMouse
Namespace: DeltaEngine.Input.Windows
Assembly: DeltaEngine.Input.Windows (in DeltaEngine.Input.Windows.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The WindowsMouse type exposes the following members.
Constructors
Name | Description | |
---|---|---|
WindowsMouse | Initializes a new instance of the WindowsMouse class |
Methods
Name | Description | |
---|---|---|
Dispose | Releases all resources used by the WindowsMouse (Overrides InputDevice Dispose .) | |
GetButtonState | (Inherited from Mouse.) | |
SetNativePosition | (Overrides Mouse SetNativePosition(Vector2D).) | |
Update | (Overrides Mouse Update(IEnumerable Entity ).) |
Properties
Name | Description | |
---|---|---|
IsAvailable | (Overrides InputDevice IsAvailable.) | |
LeftButton | (Inherited from Mouse.) | |
MiddleButton | (Inherited from Mouse.) | |
Position | (Inherited from Mouse.) | |
RightButton | (Inherited from Mouse.) | |
ScrollWheelValue |
Total accumulated mouse scroll wheel value. Compare with last frame to see the change (see
MouseZoomTrigger). Will not use multipliers like 120 to report one mouse wheel up change.
One mouse wheel up change results in a value change of +1, down is -1.
View code on GitHub (Inherited from Mouse.) | |
X1Button | (Inherited from Mouse.) | |
X2Button | (Inherited from Mouse.) |
Remarks
Examples
[Test, Ignore] public void SetPositionAndUpdateTrigger() { var setPoint = new Vector2D(0.8f, 0.4f); var moveTrigger = new MouseHoverTrigger(); mouse.SetNativePosition(setPoint); mouse.Update(new List<Entity>(new[] { moveTrigger })); Assert.AreEqual(setPoint.X, moveTrigger.LastPosition.X, 0.1f); Assert.AreEqual(setPoint.Y, moveTrigger.LastPosition.Y, 0.1f); }
See Also