MCPcopy Create free account
hub / github.com/NetHack/NetHack / GetStr

Method GetStr

win/Qt/qt_msg.cpp:95–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95const char * NetHackQtMessageWindow::GetStr(bool init)
96{
97 if (init)
98 currgetmsg = 0;
99
100 QListWidgetItem *item = list->item(currgetmsg++);
101 if (item) {
102 QString str = item->text();
103 if (str.toLatin1().length() < (int) sizeof historybuf) {
104 return strcpy(historybuf, str.toLatin1().constData());
105 //raw_printf("getstr[%d]='%s'", currgetmsg, result);
106 }
107 }
108 return NULL;
109}
110
111void NetHackQtMessageWindow::PutStr(int attr, const QString& text)
112{

Callers 2

qt_getmsghistoryMethod · 0.80
qt_putmsghistoryMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected