on_ui_component_drag
fun on_ui_component_drag( component: ComponentName, behaviour: UIComponentDrag.(subject: Entity) -> Unit)UIComponentDrag.(subject: Entity) -> Unitimport rift.ts2.UI
on_ui_component_drag(UI.Inventory.root) { player -> val moved = fromItem ?: return@on_ui_component_drag player.message("You move ${moved.name} to slot $toSlot.")}component
Section titled “component”component: ComponentNameProperties
Section titled “Properties”val from: ComponentName?fromSlot
Section titled “fromSlot”val fromSlot: Int?fromItem
Section titled “fromItem”val fromItem: ItemDefinition?val to: ComponentName?toSlot
Section titled “toSlot”val toSlot: Int?toItem
Section titled “toItem”val toItem: ItemDefinition?