(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
|