2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 05:07:43 +00:00

Various GUI logic fixes and improvements

This commit is contained in:
Jack Andersen
2018-01-01 14:58:38 -10:00
parent 4f888becdf
commit 8c9ad43a60
7 changed files with 377 additions and 97 deletions

22
hecl-gui/ErrorLabel.hpp Normal file
View File

@@ -0,0 +1,22 @@
#ifndef GUI_ERRORLABEL_HPP
#define GUI_ERRORLABEL_HPP
#include <QLabel>
class ErrorLabel : public QLabel
{
public:
ErrorLabel(QWidget* parent = Q_NULLPTR) : QLabel(parent) {}
void setText(const QString& str, bool success = false)
{
QPalette pal = QLabel::palette();
if (success)
pal.setColor(QPalette::WindowText, QColor(0,255,0));
else
pal.setColor(QPalette::WindowText, QColor(255,47,0));
QLabel::setPalette(pal);
QLabel::setText(str);
}
};
#endif // GUI_ERRORLABEL_HPP