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;
}
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 {
}
}
+// used when yn_function() or more() rejects player's input and tries again
+void NetHackQtMessageWindow::RehighlightPrompt()
+{
+ // selects most recent message, which causes it to be highlighted
+ if (list && list->count())
+ list->setCurrentRow(list->count() - 1);
+}
+
// are there any highlighted messages?
bool NetHackQtMessageWindow::hilit_mesgs()
{
void setMap(NetHackQtMapWindow2*);
+ void RehighlightPrompt();
bool hilit_mesgs();
void unhighlight_mesgs();
// for adding the answer for yn() to its prompt string