Interface IMouseProvider
- Namespace
- SimulationFramework.Input
- Assembly
- SimulationFramework.dll
Provides mouse input to the simulation.
public interface IMouseProvider : ISimulationComponent, IDisposable
- Inherited Members
Properties
DeltaPosition
The distance the mouse position has moved since the last frame, in pixels.
Vector2 DeltaPosition { get; }
Property Value
HeldButtons
Gets a collection of all buttons which are held this frame.
IEnumerable<MouseButton> HeldButtons { get; }
Property Value
Position
Gets or sets the mouse position in pixels relative to the origin of the window's contents.
Vector2 Position { get; set; }
Property Value
PressedButtons
Gets a collection of all buttons pressed this frame. A key is only considered pressed on the first frame that it is held.
IEnumerable<MouseButton> PressedButtons { get; }
Property Value
ReleasedButtons
Gets a collection of all buttons released this frame. A key is only considered released on the first frame that it is not held.
IEnumerable<MouseButton> ReleasedButtons { get; }
Property Value
ScrollWheelDelta
The scroll wheel movement since the last frame.
float ScrollWheelDelta { get; }
Property Value
Visible
Whether the mouse cursor is visible.
bool Visible { get; set; }
Property Value
Methods
SetCursor(SystemCursor)
Sets the mouse cursor to a system cursor.
void SetCursor(SystemCursor cursor)
Parameters
cursor
SystemCursor
SetCursor(ReadOnlySpan<Color>, int, int, int, int)
Sets the mouse cursor to a custom image.
void SetCursor(ReadOnlySpan<Color> cursor, int width, int height, int anchorX, int anchorY)
Parameters
Events
ButtonPressed
Invoked when a button is pressed.
event MouseButtonEvent ButtonPressed
Event Type
ButtonReleased
Invoked when a button is released
event MouseButtonEvent ButtonReleased