CleverRaven/Cataclysm-DDA — pull request #9830 by BevapDin (2014-11-04 06:44:41+00:00)
Title: Fix item info display

Fixes #9796

I reverted the broken f1ca873bd48a8a24313b34e742d4d6ba9c8b35bf (which caused the issue) and made it new. The whole item info text is now put into a single string, which is than wrapped and printed with `fold_and_print`. That way all the newlines remain and the word wrapping is applied properly to all entries, even when several iteminfo entries go on one line.

The are some other UI fixes in:
- `game::list_items` and `list_monsters` did not clear the item info screen (only with wide sidebar), so I added `werase` calls, but that turned out to be inconvenient and time-consuming, so I changed the function use the `WINDOW_PTR`. It automatically erases, refreshes and deletes the window.
- The obscure logic in `draw_item_info` could lead to a memory leak under certain circumstances: when called with `without_getch=true`, the window would be created, but the call to `delwin` in the other `draw_item_info` function would be skipped, so the window would not be deleted at all. The logic is also dangerous as `draw_item_info` might unexpectedly delete the window pointer: call it as `draw_item_info(some_window, ...,`without_getch=false)` - triggers the deletion of `some_window`, which might still be used by the caller.
- Shorten the string in the item pickup window, try it with "strawberry jam in a 3l glass jar (fresh)" or something like that.

Also fixes #9766 (last commit).

----

Btw. the compare items interface thinks that lower nutrition is better and higher quench is better, I think it should the higher value as better in both properties.

Another thing: it might be easier to read when the armor descriptions says "Both arms." instead of listing "The left arm. The right arm." - same for the other sided body parts.