-
Notifications
You must be signed in to change notification settings - Fork 0
/
Hud.h
77 lines (61 loc) · 1.66 KB
/
Hud.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef HUD_H
#define HUD_H
#include <irrlicht.h>
class ScreenQuad;
class Hud
{
public:
class RoadBookEntry
{
public:
irr::gui::IGUIStaticText* numText;
irr::gui::IGUIStaticText* globalDistanceText;
irr::gui::IGUIStaticText* localDistanceText;
irr::gui::IGUIStaticText* noteText;
ScreenQuad* itinerQuad;
ScreenQuad* itiner2Quad;
};
public:
static void initialize();
static void finalize();
static Hud* getInstance() {return hud;}
private:
static Hud* hud;
public:
Hud();
~Hud();
void setVisible(bool newVisible);
bool getVisible(); // inline
void preRender(float p_angle);
void render();
void updateRoadBook();
irr::gui::IGUIStaticText* getEditorText(); // inline
private:
bool visible;
ScreenQuad* miniMapQuad;
ScreenQuad* compassQuad;
ScreenQuad* compassWPQuad;
ScreenQuad* tripMasterQuad;
ScreenQuad* roadBookBGQuad;
ScreenQuad* roadBookBGOQuad;
ScreenQuad* speedometerQuad;
ScreenQuad* stickQuad;
ScreenQuad* rpmStickQuad;
irr::gui::IGUIStaticText* compassText;
irr::gui::IGUIStaticText* tmPartText;
irr::gui::IGUIStaticText* tmTotalText;
irr::gui::IGUIStaticText* speedText;
irr::gui::IGUIStaticText* stageTimeText;
irr::gui::IGUIStaticText* gearText;
irr::gui::IGUIStaticText* editorText;
RoadBookEntry roadBookEntries[4];
};
inline bool Hud::getVisible()
{
return visible;
}
inline irr::gui::IGUIStaticText* Hud::getEditorText()
{
return editorText;
}
#endif // HUD_H