-
Notifications
You must be signed in to change notification settings - Fork 0
/
hudmessagesystem.h
49 lines (39 loc) · 971 Bytes
/
hudmessagesystem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef HUDMESSAGESYSTEM_H
#define HUDMESSAGESYSTEM_H
#include <QObject>
#include <QGLWidget>
#include <QString>
#include <QDebug>
#include <QMap>
struct HudString
{
QFont font;
QColor color;
QString hud;
int x;
int y;
HudString (int x, int y, QString hudText, QFont font, QColor color)
{
this->x = x;
this->y = y;
this->hud = hudText;
this->font = font;
this->color = color;
}
};
class HudMessageSystem : public QObject
{
Q_OBJECT
public:
HudMessageSystem(QGLWidget *ge, QObject *parent = 0);
void setText(QString key, QString text, QFont font, QColor color);
void setText(QString key, QString text, GLfloat x, GLfloat y, bool center, QFont font, QColor color);
void removeText (QString key);
QMap<QString, HudString *>* getHudStrings();
private:
QGLWidget* ge;
QMap<QString, HudString*>* HudStrings;
signals:
public slots:
};
#endif // HUDMESSAGESYSTEM_H