CleverRaven/Cataclysm-DDA — pull request #2712 by atomicdryad (2013-08-28 11:32:24+00:00)
Title: Advanced inventory, wish, monster wish: quick find-as-you-type filtering via '/', rewrites and refactors.

+ advanced_inv: per-pane filtering via '/' or 'f' which updates as you type. Filter persists until cleared or game reload. advanced_inv is now a class of it's own to remove game.cpp clutter, and take advantage of shared namespace.

+ game::wish(), game::monster_wish(): both rewritten to utilize uimenu's less cumbersome find/filter. The new functions also provide documentation for 'f', which spawns items in containers or toggles monster friendliness respectively.

+ uimenu: filtering via '/' which updates as you type and allows for scrolling via standard up/down/pgup/pgdown keys while filter input is focused.

+ uimenu: generic callback class for handling keypresses, updates to currently active entry, and window refreshes, via 'uimenu_callback' abstract base class

+ uimenu: moved to ui_container abstract base class, for possible expansion into something approaching a ui toolkit.

+ string_input_popup: split into:

+ string_input_popup ( same arguments ), -- which is just the popup stuff and calls:

+ string_input_window( WINDOW *, std::string input, int max_length, int startx, int starty, int endx, bool loop, long & key, std::string identifier, int w_x, int w_y, bool dorefresh); -- this is all of string_input_popup without the popup and windowing bits, which allows integration into other functions that have their own windows ( such as uimenu and advanced inventory )

the long string of commandline options is cumbersome but fully functional, and I'm likely to make this into a class as other options are added ( numeric-only and color options)