From: Tangles Date: Mon, 28 May 2018 11:55:24 +0000 (+1000) Subject: curses - don't use popup for count selection. X-Git-Tag: nmake-explicit-path~89^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c3ecb5c43d131d5a8c7376730169f09ff373fe05;p=nethack curses - don't use popup for count selection. There are issues with dismissing the popup afterwards. These were not really investigated as a count-selection doesn't really warrant a popup anyway. --- diff --git a/win/curses/cursmesg.c b/win/curses/cursmesg.c index 8b9199e2f..1e6f7dbab 100644 --- a/win/curses/cursmesg.c +++ b/win/curses/cursmesg.c @@ -298,8 +298,8 @@ curses_prev_mesg() } -/* Shows Count: in a separate window, or at the bottom of the message -window, depending on the user's settings */ +/* Shows Count: at the bottom of the message window, + popup_dialog is not currently implemented for this function */ void curses_count_window(const char *count_text) @@ -317,41 +317,30 @@ curses_count_window(const char *count_text) counting = TRUE; - if (iflags.wc_popup_dialog) { /* Display count in popup window */ - startx = 1; - starty = 1; + curses_get_window_xy(MESSAGE_WIN, &winx, &winy); + curses_get_window_size(MESSAGE_WIN, &messageh, &messagew); - if (countwin == NULL) { - countwin = curses_create_window(25, 1, UP); - } - - } else { /* Display count at bottom of message window */ - - curses_get_window_xy(MESSAGE_WIN, &winx, &winy); - curses_get_window_size(MESSAGE_WIN, &messageh, &messagew); - - if (curses_window_has_border(MESSAGE_WIN)) { - winx++; - winy++; - } + if (curses_window_has_border(MESSAGE_WIN)) { + winx++; + winy++; + } - winy += messageh - 1; + winy += messageh - 1; - if (countwin == NULL) { + if (countwin == NULL) { #ifndef PDCURSES - countwin = newwin(1, 25, winy, winx); + countwin = newwin(1, 25, winy, winx); #endif /* !PDCURSES */ - } + } #ifdef PDCURSES - else { - curses_destroy_win(countwin); - } + else { + curses_destroy_win(countwin); + } - countwin = newwin(1, 25, winy, winx); + countwin = newwin(1, 25, winy, winx); #endif /* PDCURSES */ - startx = 0; - starty = 0; - } + startx = 0; + starty = 0; mvwprintw(countwin, starty, startx, "%s", count_text); wrefresh(countwin);