GetInventory (SOLVED)

Started by Sam., Mon 18/04/2005 20:14:47

Previous topic - Next topic

Sam.

On my interface, i have a small box which displays one inventory item at a time, with arrows to change the item. Is there a way to get the inventory number of the item which is being shown at any time. I had thought that a varialble incremented byt the arrows would work, but this would be uselss as soon as an item was lost or added to the middle. Any suggestions?


Just in case you are wondering, this is so i can setctiveinv and then process_click(MODE_inv) on another part of my gui.
Bye bye thankyou I love you.

Pumaman

This is difficult to do in 2.62; you might want to hang on for 2.7 because then you can just do this:

int theItem = invWindow.ItemAtIndex[invWindow.TopItem].ID;

Sam.

but..

but...

Does it do this in the beta?

If not, when is 2.7 releasified?
Bye bye thankyou I love you.

Ashen

It does do it in the beta, yes.

However, if you've used 2.62 and don't want to re-write all your code, you could maybe use GetInvAt (x, y) and fill in the co-ords of the inventory window.
I know what you're thinking ... Don't think that.

Sam.

hehe, mind reader, thats what i just wrote into my code!
Bye bye thankyou I love you.

SMF spam blocked by CleanTalk