onClick

inline fun <T : Actor> T.onClick(crossinline listener: T.() -> Unit): ClickListener

Attaches a ClickListener to this actor.

Return

ClickListener instance.

Parameters

listener

invoked each time this Actor is clicked. Consumes the Actor as this.