(Formerly known as GetInvGraphic, which is now obsolete)
(Formerly known as SetInvItemPic, which is now obsolete)
int InventoryItem.Graphic
Gets/sets the sprite slot number of the inventory item. You could use this
with the Object.Graphic property as a means of the player 'dropping' an inventory item, or
it may be useful if you want to do a Raw Drawn inventory window.
NOTE: For backwards compatibility, if you change this property and the CursorGraphic
currently has the same sprite as the main Graphic, then the CursorGraphic will be changed
too.
Example:
int slot = player.ActiveInventory.Graphic;
will place the sprite number of the player's current inventory item into slot.
See Also: InventoryItem.CursorGraphic,
InventoryItem.GetAtScreenXY,
InventoryItem.Name
|