[ enum ] MouseButton
Description:
Enum for mouse buttons.
Compare to mouseEvent.button on mouse events or use with ui.mouseAction(action, button).
Type: number
Properties:
| Name | Description |
|---|---|
|
Left mouse button. |
|
Right mouse button. |
|
Middle mouse button. |
Examples:
Checking if right mouse button was clicked:
if(mouseEvent.button === MouseButton.Right)
{
console.log("Right click);
}
Performing a mouse click:
ui.mouseAction(MouseAction.Click, MouseButton.Left);
