append to the last message; usually the user's answer to a prompt
| 184 | |
| 185 | // append to the last message; usually the user's answer to a prompt |
| 186 | void NetHackQtMessageWindow::AddToStr(const char *answer) |
| 187 | { |
| 188 | if (list) { |
| 189 | QListWidgetItem *item = list->currentItem(); |
| 190 | int ct = 0; |
| 191 | if (!item && (ct = list->count()) > 0) { |
| 192 | list->setCurrentRow(ct - 1); |
| 193 | item = list->currentItem(); |
| 194 | } |
| 195 | if (item) |
| 196 | item->setText(item->text() + QString(" %1").arg(answer)); |
| 197 | else // just in case... |
| 198 | NetHackQtMessageWindow::PutStr(ATR_NONE, answer); |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | // used when yn_function() or more() rejects player's input and tries again |
| 203 | void NetHackQtMessageWindow::RehighlightPrompt() |
no test coverage detected