Class MouseButtonDownEventArgs
This event is triggered when a mouse button is pressed.
Inherited Members
Namespace: OpenTK.Platform
Assembly: OpenTK.Platform.dll
Syntax
public class MouseButtonDownEventArgs : WindowEventArgs
Constructors
MouseButtonDownEventArgs(WindowHandle, Vector2, MouseButton, KeyModifier, int)
Initializes a new instance of the MouseButtonDownEventArgs class.
Declaration
public MouseButtonDownEventArgs(WindowHandle window, Vector2 clientPosition, MouseButton button, KeyModifier modifiers, int clicks)
Parameters
| Type | Name | Description |
|---|---|---|
| WindowHandle | window | The window that was clicked on. |
| Vector2 | clientPosition | The coordinate in client coordinates where the mouse was pressed. |
| MouseButton | button | The mouse button that was pressed. |
| KeyModifier | modifiers | The modifiers that where active when the mouse button was pressed. |
| int | clicks | The click count for this event, single-click, double-click, etc. |
Properties
Button
The mouse button that was pressed.
Declaration
public MouseButton Button { get; }
Property Value
| Type | Description |
|---|---|
| MouseButton |
Clicks
The number of times this button has been clicked in a row in a small area and time limit. 1 for single-click, 2 for double-click, etc.
Declaration
public int Clicks { get; }
Property Value
| Type | Description |
|---|---|
| int |
Remarks
The details of counting multi-clicks follows the platform conventions.
ClientPosition
The position where the mouse was pressed, in client coordinates.
Declaration
public Vector2 ClientPosition { get; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
Modifiers
The active keyboard modifiers when the mouse button was pressed.
Declaration
public KeyModifier Modifiers { get; }
Property Value
| Type | Description |
|---|---|
| KeyModifier |