Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: De-Communizer on Mon 07/09/2009 17:43:13

Title: Returning to the top of the inventory when the box is opened...
Post by: De-Communizer on Mon 07/09/2009 17:43:13
Not sure if it's possible, or I'll have to manage as is, but I've got a custom inventory GUI. It's going to have a lot of items in it, but at the moment every time it opens, it's at the same position (i.e. the inventory window is showing the same objects) as when the window was closed. Is it therefore possible for me to return the view to the top every time the window is opened?
Title: Re: Returning to the top of the inventory when the box is opened...
Post by: NsMn on Mon 07/09/2009 17:46:03
Maybe your Inventory Window is just to small and you have to scroll it down?

...can we see a screenshot?  ;)
Title: Re: Returning to the top of the inventory when the box is opened...
Post by: skuttleman on Mon 07/09/2009 17:55:16
invWindow.TopItem = 0;
Title: Re: Returning to the top of the inventory when the box is opened...
Post by: De-Communizer on Mon 07/09/2009 18:55:21
Ah, so it *is* the TopItem thing - I thought that was just a read-only thing to produce an output demonstrating what the top one was. Many thanks!
Title: Re: Returning to the top of the inventory when the box is opened...
Post by: Khris on Mon 07/09/2009 22:07:18
From the manual:

Gets/sets the index of the first item currently displayed in the inventory window.