swarm-game / swarm

Resource gathering + programming game
Other
835 stars 52 forks source link

Inventory search #126

Closed byorgey closed 1 year ago

byorgey commented 3 years ago

As you progress through the game, most likely the inventory will get very long and it will be annoying to have to scroll through the whole thing to find that one item for which you forgot the syntax or need the recipe or whatever. We should add an incremental search mode, so that when the inventory is highlighted you can hit the / key and then start typing a few characters of the thing you're looking for to narrow the list based on your search term. Maybe brick already has something like this built in for lists? I am not sure.

fryguybob commented 3 years ago

I've wanted to explore brick for a while, so I started working on this.

byorgey commented 2 years ago

Here's another idea. We could add a very lightweight search mode that is activated by hitting /. Once in search mode:

An alternative idea would be to get rid of the / to enter search mode, and just simply typing in the inventory panel causes it to narrow. However, this would require getting rid of j/k for navigation and m for making items.

byorgey commented 1 year ago

Note that #151 contains an initial (but currently abandoned) attempt at this.

byorgey commented 1 year ago

@kostmo I see you assigned yourself to this issue a long time ago --- had you written any code for it yet? Or did you have any ideas beyond what's recorded here? I might work on it if you're not. The lack of inventory search is something that annoys me often. :smile: