Does anyone know how to script the inventory GUI so that the up/down scroll buttons only appear when they're neccessary? I'm not looking for anything fancy - there's only room for a row of 3 objects in the inventory box, and if there's more the scroll buttons would appear.
Where would that scripting take place?
InvWindow.ItemCount property (http://www.adventuregamestudio.co.uk/manual/InvWindow.ItemCount.htm). (Although I think the line btnInvDown.Enabled = false; should be = true;.)
Where to put it depends on what type of inventory you have. If it turns on and off, put the code wherever you turn it on. If it's always on, repeatedly_execute is probably the best bet.
Thank you!
One more thing. This works perfectly in the repeatedly_execute:
if (inven.ItemCount>(inven.ItemsPerRow * inven.RowCount)) {
down.Visible=true;
up.Visible=true;
}
But I also want the arrows to disappear when they're not needed. I thought this would do it:
if (inven.ItemCount<(inven.ItemsPerRow * inven.RowCount)) {
down.Visible=false;
up.Visible=false;
}
But when the inventory empties down to 1 or 2 items, the arrows are still there.