curses persistent inventory window tweak
Under curses interface, provide a way to get a little more space for perm_invent without turning off windowborders entirely. Possible 'windowborders' values: 0 = no borders, max screen space available for useful info 1 = full borders, two lines and two columns wasted for each window 2 = contingent borders, show if screen is big enough, else hide New: 3 = as 1 except no borders for perm_invent window 4 = as 2 except never borders for perm_invent window 3 and 4 let the map, message, and status windows have borders while providing two extra lines and two extra columns on each line for persistent inventory. It's not much but better than nothing when borders are enabled.
This commit is contained in:
@@ -543,7 +543,7 @@ add_menu(winid wid, const glyph_info *glyphinfo,
|
||||
*/
|
||||
void
|
||||
curses_add_menu(winid wid, const glyph_info *glyphinfo,
|
||||
const ANY_P * identifier,
|
||||
const ANY_P *identifier,
|
||||
char accelerator, char group_accel, int attr,
|
||||
const char *str, unsigned itemflags)
|
||||
{
|
||||
@@ -553,12 +553,16 @@ curses_add_menu(winid wid, const glyph_info *glyphinfo,
|
||||
curses_attr = curses_convert_attr(attr);
|
||||
|
||||
if (inv_update) {
|
||||
curses_add_inv(inv_update, glyphinfo, accelerator, curses_attr, str);
|
||||
/* persistent inventory window; nothing is selectable;
|
||||
omit glyphinfo because perm_invent is to the side of
|
||||
the map so usually cramped for space */
|
||||
curses_add_inv(inv_update, accelerator, curses_attr, str);
|
||||
inv_update++;
|
||||
return;
|
||||
}
|
||||
|
||||
curses_add_nhmenu_item(wid, glyphinfo, identifier, accelerator, group_accel,
|
||||
curses_add_nhmenu_item(wid, glyphinfo, identifier,
|
||||
accelerator, group_accel,
|
||||
curses_attr, str, itemflags);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user