(Formerly known as game.num_inv_items, which is now obsolete)
readonly int InvWindow.ItemCount;
Gets the total number of items contained in the inventory window. This will tend
to equal the total number of items that the character has (though it may not if
the "Display multiple items multiple times" game setting is not checked).
Example:
if (invMain.ItemCount > (invMain.ItemsPerRow * invMain.RowCount)) {
btnInvUp.Enabled = true;
btnInvDown.Enabled = false;
}
will enable the GUI buttons btnInvUp and btnInvDown if there are more
inventory items than will fit in the inventory window.
See Also: InvWindow.ItemAtIndex,
InvWindow.ItemsPerRow,
InvWindow.RowCount
|