I have no idea, how does the game put items on the floor in the inventory screen...
It's processing them in the (for player random) order they have been put into inventory.
Then it's calculating the topmost leftmost slot they still fit in.
...but it is really uncomfortable. It will be good, if the items are sorted by their listOrder value. It means, PISTOL should be placed first, PISTOL clip should be second and nearby the PISTOL, RIFLE and RIFLE CLIP are next... etc.
That would also mean there will be a lot of holes (empty slots) since the items will not occupy all available space.
Can someone correct it?
I like it the way it is.
EDIT: btw. I have implemented a quick search function... searching for something should be a matter of one, maybe two seconds