Method Click
- Namespace
- GrindFest
- Assembly
- GrindFest.dll
Click(VisualElement, bool)
A player click: pointer down, pointer up, and (optionally) an explicit ClickEvent.
UI Toolkit is supposed to synthesise ClickEvent from the down/up pair; pass
alsoSendClickEvent = true if a target turns out to need it.
Returns false - and dispatches nothing - when the target has no rect yet (see HasGeometry(VisualElement)): a click aimed at a not-yet-laid-out element would land on whatever sits at (0,0) and quietly do something else.
public static bool Click(VisualElement target, bool alsoSendClickEvent = false)
Parameters
targetVisualElementalsoSendClickEventbool