ContextMenu

ContextMenu
script void ContextMenu ( int Index, int Amount, int x, int y, int Window)

code contained within Inventory/script/INV_Scripts.dh

The context menu is run when a populated inventory GridButton or SingleButton returns MOUSE_RMB. It displays several options dependant on the item class, ItemDef flags, and the CONTEXT fields of ItemList.

There are several general and class-specific context options: All scripts are called with the arguments passed from ContextMenu - x, y and Window, in order to effect the correct inventory and position.
 * Drop, which calls DropItemScript
 * Use, only displays for CLASS_CONSUMABLE, and calls UseItemScript
 * Split, only displays for stackables, and calls SplitItemScript