Qt4: Handle saving/loading message history

This commit is contained in:
Pasi Kallinen
2017-10-11 00:32:39 +03:00
parent 2fcf1ad139
commit c6f0058e3d
4 changed files with 47 additions and 12 deletions

View File

@@ -73,6 +73,12 @@ void NetHackQtMessageWindow::Clear()
map->clearMessages();
}
void NetHackQtMessageWindow::ClearMessages()
{
if (list)
list->clear();
}
void NetHackQtMessageWindow::Display(bool block)
{
if (changed) {
@@ -86,7 +92,7 @@ const char * NetHackQtMessageWindow::GetStr(bool init)
if (init)
currgetmsg = 0;
QListWidgetItem *item = list->item(++currgetmsg);
QListWidgetItem *item = list->item(currgetmsg++);
if (item) {
QString str = item->text();
//raw_printf("getstr[%i]='%s'", currgetmsg, str.toLatin1().constData());