Skip to content

on_component_option

fun on_component_option(
interfaceId: Int,
componentId: Int,
option: String,
behaviour: InterfaceOpContext.(subject: Actor) -> Unit
)
InterfaceOpContext.(subject: Actor) -> Unit

Actor

Example
import rift.ts2.UI
val logout = UI.Logout.button.resolved
on_component_option(logout.interfaceId, logout.component, "Logout") { player ->
player.message("Goodbye!")
}
interfaceId: Int
componentId: Int
option: String
val interfaceId: Int
val componentId: Int
val op: Int
val option: String
val item: Int
val slot: Int
val inventory: Inventory?
val items: rift.items.ItemContainer?