Click or drag to resize

EventCheckerGetInputButtonFromEvent Method

Extracts mouse button from a keyboard event definition.

Namespace:  KSPDev.InputUtils
Assembly:  KSPDev_Utils.2.2 (in KSPDev_Utils.2.2.dll) Version: 2.2 for KSP v1
Syntax
C#
public static Nullable<PointerEventDataInputButton> GetInputButtonFromEvent(
	Event ev
)
Request Example View Source

Parameters

ev
Type: UnityEngineEvent
The event to extract the button from.

Return Value

Type: NullablePointerEventDataInputButton
The button or null if event doesn't have any recognizable mouse button.
Remarks
Only three basic buttons are supported: Left, Right, and Middle.
See Also