mirror of
https://git.zap.org.au/git/trader.git
synced 2024-12-04 14:46:45 -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)
|
bool get_yn_answer (WINDOW *win)
|
||||||
{
|
{
|
||||||
int key;
|
int key, oldattr;
|
||||||
bool ok;
|
bool ok;
|
||||||
|
|
||||||
|
|
||||||
@ -410,6 +410,8 @@ bool get_yn_answer (WINDOW *win)
|
|||||||
meta(win, true);
|
meta(win, true);
|
||||||
wtimeout(win, -1);
|
wtimeout(win, -1);
|
||||||
|
|
||||||
|
oldattr = getbkgd(win) & ~A_CHARTEXT;
|
||||||
|
wattron(win, A_BOLD);
|
||||||
curs_set(CURS_ON);
|
curs_set(CURS_ON);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@ -424,11 +426,12 @@ bool get_yn_answer (WINDOW *win)
|
|||||||
curs_set(CURS_OFF);
|
curs_set(CURS_OFF);
|
||||||
|
|
||||||
if (key == 'Y') {
|
if (key == 'Y') {
|
||||||
waddstr(win, "Yes.");
|
waddstr(win, "Yes");
|
||||||
} else {
|
} else {
|
||||||
waddstr(win, "No.");
|
waddstr(win, "No");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wattrset(win, oldattr);
|
||||||
wrefresh(win);
|
wrefresh(win);
|
||||||
return (key == 'Y');
|
return (key == 'Y');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user