SwitchCursorToItem

SwitchCursorToItem
void SwitchCursorToItem ( int X, int Y, int Window )

Function is located within Inventory/script/INV_Funcs.dh

Parameters:

 * X/Y - integer coordinates of the array position
 * Window - integer pointer to the Window pointer array (ie WINDOW_EQUIPMENT, WINDOW_WEAPON)

Description:
Called if the cursor index is populated, this function checks the allocated space (origin + item size) for blockage or stackability using CheckInventorySpace, then either denies the action, stacks the item, switches the item, or places it in free space.

If this function is used to modify a single dimension InventoryDef, it skips the CheckInventorySpace check.

Sister function is SwitchItemToCursor