Files
nethack/win/Qt/qt_msg.h
PatR dde561810d Qt prompt highlighting
When qt_yn_function() or qt_more() is asking for a single character
response, typing anything will cause the prompt line in the message
window to stop being highlighted.  If they reject what's been typed,
they beep (--More-- doesn't start beeping until second rejection);
change both of them to also rehighlight the prompt line to give a
visual indication that the question/acknowledgement is still being
asked.
2020-10-08 11:24:11 -07:00

52 lines
1.1 KiB
C++

// Copyright (c) Warwick Allison, 1999.
// Qt4 conversion copyright (c) Ray Chason, 2012-2014.
// NetHack may be freely redistributed. See license for details.
// qt_msg.h -- a message window
#ifndef QT4MSG_H
#define QT4MSG_H
#include "qt_win.h"
namespace nethack_qt_ {
class NetHackQtMapWindow2;
class NetHackQtMessageWindow : QObject, public NetHackQtWindow {
Q_OBJECT
public:
NetHackQtMessageWindow();
~NetHackQtMessageWindow();
virtual QWidget* Widget();
virtual void Clear();
virtual void Display(bool block);
virtual const char *GetStr(bool init);
virtual void PutStr(int attr, const QString& text);
void Scroll(int dx, int dy);
void ClearMessages();
void setMap(NetHackQtMapWindow2*);
void RehighlightPrompt();
bool hilit_mesgs();
void unhighlight_mesgs();
// for adding the answer for yn() to its prompt string
void AddToStr(const char *answerbuf);
private:
QListWidget* list;
bool changed;
int currgetmsg;
NetHackQtMapWindow2* map;
private slots:
void updateFont();
};
} // namespace nethack_qt_
#endif