Skip to content

on_ui_component_click

fun on_ui_component_click(behaviour: UIComponentClick.(subject: Entity) -> Unit)
UIComponentClick.(subject: Entity) -> Unit

Entity

Example
import rift.ts2.UI
on_ui_component_click(UI.Orbs.runbutton) { player ->
player.message("You toggle run.")
}
val ui: UIName
val component: ComponentName?
val option: Int
val subOption: Int?
val childIndex: Int
val slot: Int?
val item: ItemDefinition?
val slots: List<Int>
val owner: ComponentName?

fun on_ui_component_click(
component: ComponentName,
behaviour: UIComponentClick.(subject: Entity) -> Unit
)
UIComponentClick.(subject: Entity) -> Unit

Entity

component: ComponentName

ComponentName

val ui: UIName
val component: ComponentName?
val option: Int
val subOption: Int?
val childIndex: Int
val slot: Int?
val item: ItemDefinition?
val slots: List<Int>
val owner: ComponentName?

fun on_ui_component_click(
ui: UIName,
behaviour: UIComponentClick.(subject: Entity) -> Unit
)
UIComponentClick.(subject: Entity) -> Unit

Entity

ui: UIName

UIName

val ui: UIName
val component: ComponentName?
val option: Int
val subOption: Int?
val childIndex: Int
val slot: Int?
val item: ItemDefinition?
val slots: List<Int>
val owner: ComponentName?