Class MouseSimulated
public class MouseSimulated : MouseDeviceBase, IMouseDevice, IPointerDevice, IInputDevice
- Inheritance
-
MouseSimulated
- Implements
- Inherited Members
- Extension Methods
Constructors
MouseSimulated(InputSourceSimulated)
public MouseSimulated(InputSourceSimulated source)
Parameters
source
InputSourceSimulated
Properties
Id
The unique identifier of this device
public override Guid Id { get; }
Property Value
IsPositionLocked
Gets or sets if the mouse is locked to the screen
public override bool IsPositionLocked { get; }
Property Value
MouseState
public MouseDeviceState MouseState { get; }
Property Value
Name
The name of the device
public override string Name { get; }
Property Value
PointerState
public PointerDeviceState PointerState { get; }
Property Value
Source
The input source the device belongs to.
public override IInputSource Source { get; }
Property Value
Methods
LockPosition(bool)
Locks the mouse position to the screen
public override 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
public override void SetPosition(Vector2 position)
Parameters
position
Vector2
SimulateMouseDown(MouseButton)
public void SimulateMouseDown(MouseButton button)
Parameters
button
MouseButton
SimulateMouseUp(MouseButton)
public void SimulateMouseUp(MouseButton button)
Parameters
button
MouseButton
SimulateMouseWheel(float)
public void SimulateMouseWheel(float wheelDelta)
Parameters
wheelDelta
float
SimulatePointer(PointerEventType, Vector2, int)
public void SimulatePointer(PointerEventType pointerEventType, Vector2 position, int id = 0)
Parameters
pointerEventType
PointerEventTypeposition
Vector2id
int
UnlockPosition()
Unlocks the mouse position if it was locked
public override 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
inputEvents
List<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