Interface IMouseDevice
Represents functionality specific to mouse input such as buttons, wheels, mouse locking and setting cursor position
public interface IMouseDevice : IPointerDevice, IInputDevice
- Inherited Members
- Extension Methods
Properties
Delta
Mouse delta
Vector2 Delta { get; }
Property Value
DownButtons
The mouse buttons that are down
IReadOnlySet<MouseButton> DownButtons { get; }
Property Value
IsPositionLocked
Gets or sets if the mouse is locked to the screen
bool IsPositionLocked { get; }
Property Value
Position
Normalized position of the mouse inside the window
Vector2 Position { get; }
Property Value
PressedButtons
The mouse buttons that have been pressed since the last frame
IReadOnlySet<MouseButton> PressedButtons { get; }
Property Value
ReleasedButtons
The mouse buttons that have been released since the last frame
IReadOnlySet<MouseButton> ReleasedButtons { get; }
Property Value
Methods
LockPosition(bool)
Locks the mouse position to the screen
void LockPosition(bool forceCenter = false)
Parameters
forceCenter
boolForce the mouse position to the center of the screen
SetPosition(Vector2)
Attempts to set the pointer position, this only makes sense for mouse pointers
void SetPosition(Vector2 normalizedPosition)
Parameters
normalizedPosition
Vector2
UnlockPosition()
Unlocks the mouse position if it was locked
void UnlockPosition()