onEnter

inline fun <T : Actor> T.onEnter(crossinline listener: T.() -> Unit): InputListener

Attaches a ClickListener to this actor.

Return

ClickListener instance.

Parameters

listener

invoked each time the mouse cursor or finger touch enters the actor. On desktop this will occur even when no mouse buttons are pressed. Consumes the Actor as this.