Class GenericClickHelper

An aggregate helper class for widgets that can be clicked, in the general sense that the widget is/has a button or is clickable. This does not mean that the widget is only clickable with a pointer; it could also be "clicked" with a keyboard.

Keeps its current click state as well as its last click state, and whether the last click state change resulted in an actual click.

Hierarchy (view full)

Implements

Constructors

Properties

clickState: ClickState = ClickState.Released

The current click state

clickStateChanged: boolean = false

Did the last click event handle result in a click state change?

lastClickState: ClickState = ClickState.Released

Last click state

wasClick: boolean = false

Did the last click state change result in a click?

widget: Widget

Methods

  • Reset the click helper to its default state, except for the clickStateChanged flag, which is set to true. Only call this if absolutely necessary, such as when the owner Widget is re-activated (this way, hover states don't linger when a Widget is disabled).

    You may be looking for BaseClickHelper#doneProcessing instead.

    Returns void