setKeyboardFocus

fun Actor.setKeyboardFocus(focus: Boolean = true)

Modifies current stage keyboard focus if this actor is currently shown.

Parameters

focus

if true, will set current keyboard focus to this actor. If false and the actor is currently focused, will clear keyboard focus of actor's stage.