Files
nethack/win/curses/cursdial.h
PatR be966cfe5a curses ^P msg_window:Full
This changes the recently added msg_window:f for curses to start
viewing the old messages on the last page rather than the first.  For
msg_window:Reversed (the default for curses) and for either direction
when all of the message history happens to fit on one page, there's
no change.  But for multiple pages, the FIFO feedback now pads the top
of the first page with blank lines so that the last page is full, and
it starts out showing that last page first.  So if you only want to go
back few or several messages, they will be in view immediately.

Old layout:
|first message (oldest)   |  |1st message of last page |
|2nd message of 1st page  |  | ...                     |
| ...                     |  |final (most recent) mesg |
| ...                     |  | (blank filler)          |
|last message of 1st page |  | (blank filler)          |
|             (1 of 2) => |  |          <= (2 of 2)    |
and ^P started with first page visible and needed normal menu handling,
<space> or '>' or '|', to go forward to view the most recent messages.

New layout:
|1st message of last page |  | (blank filler)          |
|2nd message of last page |  | (blank filler)          |
| ...                     |  |first message (oldest)   |
| ...                     |  | ...                     |
|final (most recent)      |  |last message of 1st page |
| <= (2 of 2)             |  |    (1 of 2) =>          |
and ^P starts on last page (two of two in this example) but can go
back with '<' and '^'.

So if the total size takes one and third pages (which isn't uncommon
for the default number of kept messages), you'll see 3/4 of the most
recent messages on the initial screen, then you can page backward if
you want to see the other 1/4.

The page indicator is deliberately drawn a bit differently just to
draw attention to the fact you're starting on the last page.  I'm not
sure whether that is actually worthwhile but it was trivial to do.
2019-04-02 01:11:59 -07:00

26 lines
1.1 KiB
C

/* vim:set cin ft=c sw=4 sts=4 ts=8 et ai cino=Ls\:0t0(0 : -*- mode:c;fill-column:80;tab-width:8;c-basic-offset:4;indent-tabs-mode:nil;c-file-style:"k&r" -*-*/
/* NetHack 3.6 cursdial.h */
/* Copyright (c) Karl Garrison, 2010. */
/* NetHack may be freely redistributed. See license for details. */
#ifndef CURSDIAL_H
# define CURSDIAL_H
/* Global declarations */
void curses_line_input_dialog(const char *prompt, char *answer, int buffer);
int curses_character_input_dialog(const char *prompt, const char *choices,
CHAR_P def);
int curses_ext_cmd(void);
void curses_create_nhmenu(winid wid);
void curses_add_nhmenu_item(winid wid, int glyph, const ANY_P *identifier,
CHAR_P accelerator, CHAR_P group_accel, int attr,
const char *str, BOOLEAN_P presel);
void curs_menu_set_bottom_heavy(winid);
void curses_finalize_nhmenu(winid wid, const char *prompt);
int curses_display_nhmenu(winid wid, int how, MENU_ITEM_P **_selected);
boolean curses_menu_exists(winid wid);
void curses_del_menu(winid, boolean);
#endif /* CURSDIAL_H */