-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLine.h
136 lines (113 loc) · 2.31 KB
/
Line.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/**
* Line.h
*
* Tank @ War Project
* March 2012
*/
#ifndef LINE_H_
#define LINE_H_
#define IMAGE_PLACEHOLDER "[Image_placeholder]"
#include <irrlicht.h>
#include <vector>
class Line {
private:
irr::u32 lifeTime;
irr::u32 createTime;
std::vector<irr::core::stringw> strings;
std::vector<irr::video::SColor> colors;
std::vector<irr::video::ITexture*> images;
irr::gui::IGUIFont* font;
public:
/**
* Constructor of Line
* @param lifeTime (optional, 0 = maximum lifeTime)
*/
Line(irr::u32 lifeTime = 0);
/**
* Constructor of Line
* @param font
* @param lifeTime (optional, 0 = maximum lifeTime)
*/
Line(irr::gui::IGUIFont* font, irr::u32 lifeTime = 0);
/**
* Destructor
*/
virtual ~Line();
/**
* Get lifetime of this line
* @return lifetime
*/
irr::u32 getLifetime() const;
/**
* Set lifetime in this line
* @param lifetime
*/
void setLifetime(irr::u32 lifetimes);
/**
* Get creation time of this line
* @return time
*/
irr::u32 getCreateTime() const;
/**
* Return true if this line is a temporary line
* @return bool
*/
bool isTemporary();
/**
* Return true if this line is expirede
* @return bool
*/
bool isExpired();
/**
* Get strings in this line
* @return strings
*/
std::vector<irr::core::stringw> getStrings() const;
/**
* Set strings in this line
* @param strings
*/
void setStrings(std::vector<irr::core::stringw> strings);
/**
* Get colors in this line
* @return colors
*/
std::vector<irr::video::SColor> getColors() const;
/**
* Set colors in this line
* @param colors
*/
void setColors(std::vector<irr::video::SColor> colors);
/**
* Get images in this line
* @return images
*/
std::vector<irr::video::ITexture*> getImages() const;
/**
* Set images in this line
* @param images
*/
void setImages(std::vector<irr::video::ITexture*> images);
/**
* Add string to the line
* @param string
* @param color (optional)
*/
void addString(irr::core::stringw string, irr::video::SColor color = irr::video::SColor(255, 255, 255, 255));
/**
* Add image to the line
* @param image
*/
void addImage(irr::video::ITexture* image);
/**
* Get font
* @return font
*/
irr::gui::IGUIFont* getFont() const;
/**
* Set font
* @param font
*/
void setFont(irr::gui::IGUIFont* font);
};
#endif /* LINE_H_ */