Click or drag to resize
DigitalRuneInputManagerMousePosition Property
Gets or sets the mouse position.

Namespace: DigitalRune.Game.Input
Assembly: DigitalRune.Game.Input (in DigitalRune.Game.Input.dll) Version: 1.8.0.0 (1.8.0.14467)
Syntax
public Vector2F MousePosition { get; set; }

Property Value

Type: Vector2F
The mouse position.

Implements

IInputServiceMousePosition
Remarks

MousePositionRaw is the mouse position relative to the game window - as it was read using the XNA Mouse class. MousePositionDeltaRaw is the mouse position change since the last frame. Both properties are read-only.

The properties MousePosition and MousePositionDelta are set to the same values as MousePositionRaw and MousePositionDeltaRaw in each frame. These properties have a setter and can therefore be modified by other game components. MousePosition and MousePositionDelta store any changed values for the rest of the frame. This is useful if the mouse position needs to be transformed. For example, the mouse position can be transformed to be relative to a viewport within the game window.

If MousePosition is modified, MousePositionDelta should be modified accordingly.

See Also