onScrollFocusEvent

inline fun <T : Actor> T.onScrollFocusEvent(catchEvent: Boolean = false, crossinline listener: T.(event: FocusListener.FocusEvent) -> Unit): EventListener

Attaches an EventListener optimized to listen for scroll focus events fired for this actor.

Return

EventListener instance.

Parameters

catchEvent

if true, the event will not be passed further after it is handled by this listener. Defaults to false.

listener

will be invoked each time scroll focus status changes on this actor. FocusEvent.isFocused can be used to the determine current status. Consumes the triggered FocusEvent and the Actor that the listener was originally attached to as this.