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

TopItem property (inv window)

(Formerly known as game.top_inv_item, which is now obsolete)

int InvWindow.TopItem;
Gets/sets the index of the first item currently displayed in the inventory window. The first item is represented by 0, and the last item is has an index of ItemCount - 1.

You can use this to work out whether to display scroll arrows or not.

Example:

if (invMain.TopItem > 0) {
  btnScrollUp.Visible = true;
}
else {
  btnScrollUp.Visible = false;
}
makes the btnScrollUp button visible or invisible depending on whether the inventory list can be scrolled up.

See Also: InvWindow.ItemCount


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