Qt prompt highlighting
When qt_yn_function() or qt_more() is asking for a single character response, typing anything will cause the prompt line in the message window to stop being highlighted. If they reject what's been typed, they beep (--More-- doesn't start beeping until second rejection); change both of them to also rehighlight the prompt line to give a visual indication that the question/acknowledgement is still being asked.
This commit is contained in:
@@ -588,6 +588,11 @@ char NetHackQtBind::qt_more()
|
||||
default:
|
||||
if (++complain > 1)
|
||||
NetHackQtBind::qt_nhbell();
|
||||
// typing anything caused the most recent message line
|
||||
// (which happens to our prompt) from having highlighting
|
||||
// be removed; put that back
|
||||
if (mesgwin)
|
||||
mesgwin->RehighlightPrompt();
|
||||
retry = true;
|
||||
break;
|
||||
}
|
||||
@@ -669,6 +674,13 @@ char NetHackQtBind::qt_yn_function(const char *question_,
|
||||
Strcpy(cbuf, visctrl(def));
|
||||
} else {
|
||||
NetHackQtBind::qt_nhbell();
|
||||
// typing anything caused the most recent message line
|
||||
// (which happens to our prompt) from having highlighting
|
||||
// be removed; put that back
|
||||
NetHackQtMessageWindow
|
||||
*mesgwin = main ? main->GetMessageWindow() : NULL;
|
||||
if (mesgwin)
|
||||
mesgwin->RehighlightPrompt();
|
||||
// and try again...
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user