Class MouseDeviceBase
Base class for mouse devices, implements some common functionality of IMouseDevice, inherits from PointerDeviceBase
public abstract class MouseDeviceBase : PointerDeviceBase, IMouseDevice, IPointerDevice, IInputDevice- Inheritance
- 
      objectMouseDeviceBase
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
MouseDeviceBase()
protected MouseDeviceBase()Fields
MouseState
protected MouseDeviceState MouseStateField Value
Properties
Delta
Mouse delta
public Vector2 Delta { get; }Property Value
DownButtons
The mouse buttons that are down
public IReadOnlySet<MouseButton> DownButtons { get; }Property Value
IsPositionLocked
Gets or sets if the mouse is locked to the screen
public abstract bool IsPositionLocked { get; }Property Value
Position
Normalized position of the mouse inside the window
public Vector2 Position { get; }Property Value
PressedButtons
The mouse buttons that have been pressed since the last frame
public IReadOnlySet<MouseButton> PressedButtons { get; }Property Value
ReleasedButtons
The mouse buttons that have been released since the last frame
public IReadOnlySet<MouseButton> ReleasedButtons { get; }Property Value
Methods
LockPosition(bool)
Locks the mouse position to the screen
public abstract void LockPosition(bool forceCenter = false)Parameters
- forceCenterbool
- Force the mouse position to the center of the screen 
SetPosition(Vector2)
Attempts to set the pointer position, this only makes sense for mouse pointers
public abstract void SetPosition(Vector2 normalizedPosition)Parameters
- normalizedPositionVector2
UnlockPosition()
Unlocks the mouse position if it was locked
public abstract void UnlockPosition()Update(List<InputEvent>)
Updates the input device, filling the list inputEvents with input events that were generated by this device this frame
public override void Update(List<InputEvent> inputEvents)Parameters
- inputEventsList<InputEvent>
- A list that gets filled with input events that were generated since the last frame 
Remarks
Input devices are always updated after their respective input source