Class MouseButtonEventArgs
Defines the event data for ButtonDown and ButtonUp events.
Inherited Members
Namespace: OpenTK.Input
Assembly: OpenTK.dll
Syntax
public class MouseButtonEventArgs : MouseEventArgs
Remarks
Do not cache instances of this type outside their event handler. If necessary, you can clone an instance using the MouseButtonEventArgs(MouseButtonEventArgs) constructor.
Constructors
MouseButtonEventArgs()
Constructs a new MouseButtonEventArgs instance.
Declaration
public MouseButtonEventArgs()
MouseButtonEventArgs(MouseButtonEventArgs)
Constructs a new MouseButtonEventArgs instance.
Declaration
public MouseButtonEventArgs(MouseButtonEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
MouseButtonEventArgs | args | The MouseButtonEventArgs instance to clone. |
MouseButtonEventArgs(Int32, Int32, MouseButton, Boolean)
Constructs a new MouseButtonEventArgs instance.
Declaration
public MouseButtonEventArgs(int x, int y, MouseButton button, bool pressed)
Parameters
Type | Name | Description |
---|---|---|
Int32 | x | The X position. |
Int32 | y | The Y position. |
MouseButton | button | The mouse button for the event. |
Boolean | pressed | The current state of the button. |
Properties
Button
Gets the MouseButton that triggered this event.
Declaration
public MouseButton Button { get; }
Property Value
Type | Description |
---|---|
MouseButton |
IsPressed
Gets a System.Boolean representing the state of the mouse button for the event.
Declaration
public bool IsPressed { get; }
Property Value
Type | Description |
---|---|
Boolean |