Click or drag to resize

EventCheckerCheckClickEvent Method (Event, PointerEventDataInputButton)

Checks if the mouse click event has happen during the frame.

Namespace:  KSPDev.InputUtils
Assembly:  KSPDev_Utils.2.5 (in KSPDev_Utils.2.5.dll) Version: 2.5 for KSP v1
Syntax
C#
public static bool CheckClickEvent(
	Event ev,
	PointerEventDataInputButton button
)
Request Example View Source

Parameters

ev
Type: UnityEngineEvent
The event to match for.
button
Type: UnityEngine.EventSystemsPointerEventDataInputButton
The mouse button from the Unity EventSystem which is known to be pressed in this frame. The EventSystem logic is not in sync with MonoBehaviour.Update, so the event system handlers should provide the pressed button explicitly. The callers from the Update method don't need to do so since the right action button can be extracted from Input.

Return Value

Type: Boolean
true if the requested combination has matched the current frame state.
Remarks
This check treats "left" and "right" modifiers equally. And it doesn't consider any of the state modifiers (CAPS, NUM, SCROLL, etc.).
See Also