spacer graphic
spacer graphic
Montage of games AGS Logo
spacer graphic

 

spacer graphic
Menu
spacer graphic Home
About
News
Features
Download AGS
spacer graphic Games 
Games main page
Award Winners
Picks of the month
Short games
Medium length games
Full length games
In Production
Hints & Tips
Community
Forums
AGSers World Map
Member websites
Chat
Resources
Tutorials
FAQ
Knowledge Base
Downloads
Links
AGS-related links
* AGS Manual
  * Scripting
    * GUI InvWindow functions and properties

ItemCount property (inv window)

(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


User comments and notes
There are currently no user comments on this page.
The user comment facility is currently disabled.