DigitalLibrarian / VS2013Projects

DF/CDDA inspired content driven simulator
1 stars 0 forks source link

Reusable Item Selector Screen #19

Open DigitalLibrarian opened 8 years ago

DigitalLibrarian commented 8 years ago

In DF, you hit 'w' to bring up a screen to select the item to wield 'e' to bring up a screen to select the item to eat 'W' to bring up a screen to select the item to wear 'T' "" "" "" take off etc..

This is all repeating a common pattern. It takes some kind of filtered subset of an inventory and does something with the selected item. It can use the existing JaggedListSelector to control the display.

Then add all the single item screens above and make it easy to add more.

Also, bear in mind that we will eventually want a similar api for multiple items (multidrop, and the like), so it might pay off to start with the semantics of a set of items.

DigitalLibrarian commented 8 years ago

This might be best positioned in conjuction with a screen type that is responsible for yielding a set of zero or more agent commands to be played after the screen exits. Then the inventory screen can make use of this infrastructure in order to implement multiple action tasks, like equipping and dropping multiple items. This would feel a lot like the cataclysm feature of dropping lots of things and waiting for the simulation to simulate the dropping.

Sounds like it could be an elegant way to handle the UnpauseOnUpdate grossness that we have for the inventory screen exit.

DigitalLibrarian commented 8 years ago

I added a feature to JaggedListSelector which automatically pages to the selected entry. While not good enough for this ticket, it is a stop gap until graphics and rendering decisions have been made.