mirror of
https://git.zap.org.au/git/trader.git
synced 2024-11-03 17:27:29 -05:00
Print the result of the get_yn_answer() function in bold
This commit is contained in:
parent
019734c8aa
commit
3ff949efc0
@ -402,7 +402,7 @@ int attrpr (WINDOW *win, int attr, const char *format, ...)
|
||||
|
||||
bool get_yn_answer (WINDOW *win)
|
||||
{
|
||||
int key;
|
||||
int key, oldattr;
|
||||
bool ok;
|
||||
|
||||
|
||||
@ -410,6 +410,8 @@ bool get_yn_answer (WINDOW *win)
|
||||
meta(win, true);
|
||||
wtimeout(win, -1);
|
||||
|
||||
oldattr = getbkgd(win) & ~A_CHARTEXT;
|
||||
wattron(win, A_BOLD);
|
||||
curs_set(CURS_ON);
|
||||
|
||||
do {
|
||||
@ -424,11 +426,12 @@ bool get_yn_answer (WINDOW *win)
|
||||
curs_set(CURS_OFF);
|
||||
|
||||
if (key == 'Y') {
|
||||
waddstr(win, "Yes.");
|
||||
waddstr(win, "Yes");
|
||||
} else {
|
||||
waddstr(win, "No.");
|
||||
waddstr(win, "No");
|
||||
}
|
||||
|
||||
wattrset(win, oldattr);
|
||||
wrefresh(win);
|
||||
return (key == 'Y');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user