MCPcopy Index your code
hub / github.com/NetHack/NetHack / AddToStr

Method AddToStr

win/Qt/qt_msg.cpp:186–200  ·  view source on GitHub ↗

append to the last message; usually the user's answer to a prompt

Source from the content-addressed store, hash-verified

184
185// append to the last message; usually the user's answer to a prompt
186void 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
203void NetHackQtMessageWindow::RehighlightPrompt()

Callers 2

qt_moreMethod · 0.80
qt_yn_functionMethod · 0.80

Calls 1

countMethod · 0.80

Tested by

no test coverage detected