The title might sound confusing, but let me explain: I’m developing an inventory system, and I’ve almost finished everything, except for one thing — the inventory itself. I had a few ideas, but one of them caught my attention the most: using UIPageLayout to display items and navigate through the inventory. However, I ran into a problem (honestly, it’s nothing too serious, but it’s a bit annoying). In my current system, each page has a limit of 12 items. If it exceeds that, a new page is created, and the new items are directed there, and so on.
Here’s where the “dynamic” part I mentioned in the title comes in: what happens when the player deletes an item?
Suppose a player deletes an item on the first page of the inventory. This page would then have 11 items, right? That’s the issue. Even though it doesn’t ruin the user experience, it could become bothersome in the long run. The way I envisioned it is as follows: in this case, if the player deletes an item on any page other than the last one, items from subsequent pages would shift to fill the gap.
I know, this might sound a bit strange if you’re not visualizing what’s happening (unfortunately, I can’t take a screenshot at the moment of writing this), but think of a stack of blocks arranged vertically. If you remove a block from the middle, the blocks above it would fall down. My system works kind of like that, except horizontally.
Does anyone have any opinions about using UIPageLayout for an inventory system? I decided to use it mainly because, as far as I understand, it doesn’t render pages that aren’t visible, which should help with performance (I hope). I’d also like to know how you would design this inventory if you were in my place. I have some ideas for how to approach this, but I don’t feel like they’re good enough.