MouseDeviceState Class
Namespace: Stride.InputAssembly: Stride.Input.dll
An extension to PointerDeviceState that handle mouse input and translates it to pointer input
System.Object →
MouseDeviceState
Derived from MouseDeviceState:
public class MouseDeviceState
Name | Description | |
---|---|---|
Constructors | ||
MouseDeviceState(PointerDeviceState, IMouseDevice) | ||
Fields | ||
Events | ||
MouseDevice | ||
PointerState | ||
Properties | ||
Delta | ||
DownButtons | ||
Position | ||
PressedButtons | ||
ReleasedButtons | ||
Methods | ||
HandleButtonDown(MouseButton) | ||
HandleButtonUp(MouseButton) | ||
HandleMouseDelta(Vector2) | Special move that generates pointer events with just delta |
|
HandleMouseWheel(Single) | ||
HandleMove(Vector2) | Handles a single pointer move |
|
HandlePointerDown() | Handles a single pointer down |
|
HandlePointerUp() | Handles a single pointer up |
|
Update(List<InputEvent>) | Generate input events |
Constructors
MouseDeviceState(PointerDeviceState, IMouseDevice)
public MouseDeviceState(PointerDeviceState pointerState, IMouseDevice mouseDevice)
Parameters
Type | Name | Description |
---|---|---|
PointerDeviceState | pointerState | |
IMouseDevice | mouseDevice |
Fields
Events
protected readonly List<InputEvent> Events
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<InputEvent> |
MouseDevice
protected IMouseDevice MouseDevice
Field Value
Type | Description |
---|---|
IMouseDevice |
PointerState
protected PointerDeviceState PointerState
Field Value
Type | Description |
---|---|
PointerDeviceState |
Properties
Delta
public Vector2 Delta { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
DownButtons
public IReadOnlySet<MouseButton> DownButtons { get; }
Property Value
Type | Description |
---|---|
IReadOnlySet<MouseButton> |
Position
public Vector2 Position { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
PressedButtons
public IReadOnlySet<MouseButton> PressedButtons { get; }
Property Value
Type | Description |
---|---|
IReadOnlySet<MouseButton> |
ReleasedButtons
public IReadOnlySet<MouseButton> ReleasedButtons { get; }
Property Value
Type | Description |
---|---|
IReadOnlySet<MouseButton> |
Methods
HandleButtonDown(MouseButton)
public void HandleButtonDown(MouseButton button)
Parameters
Type | Name | Description |
---|---|---|
MouseButton | button |
HandleButtonUp(MouseButton)
public void HandleButtonUp(MouseButton button)
Parameters
Type | Name | Description |
---|---|---|
MouseButton | button |
HandleMouseDelta(Vector2)
Special move that generates pointer events with just delta
public void HandleMouseDelta(Vector2 delta)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | delta | The movement delta |
HandleMouseWheel(Single)
public void HandleMouseWheel(float wheelDelta)
Parameters
Type | Name | Description |
---|---|---|
System.Single | wheelDelta |
HandleMove(Vector2)
Handles a single pointer move
public void HandleMove(Vector2 newPosition)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | newPosition | New position of the pointer |
HandlePointerDown()
Handles a single pointer down
public void HandlePointerDown()
HandlePointerUp()
Handles a single pointer up
public void HandlePointerUp()
Update(List<InputEvent>)
Generate input events
public void Update(List<InputEvent> inputEvents)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<InputEvent> | inputEvents |