43class Hud :
public Listener
51 qhandle_t shaderHandle;
53 hudAlign_t alignX, alignY;
69 bool fade_alpha_first;
70 int fade_move_x_first;
71 int fade_move_y_first;
73 float fade_alpha_current;
74 float fade_move_current;
75 float fade_scale_current;
76 float fade_time_current;
78 float fade_alpha_time;
80 float fade_scale_time;
84 float fade_alpha_start;
85 float fade_move_x_start;
86 float fade_move_y_start;
87 float fade_scale_w_start;
88 float fade_scale_h_start;
89 float fade_time_alpha_start;
91 float fade_alpha_target;
92 float fade_move_x_target;
93 float fade_move_y_target;
94 float fade_scale_w_target;
95 float fade_scale_h_target;
96 float fade_time_target;
100 qboolean always_show;
105 void SetBroadcast(
int clientNumber = -1);
114 CLASS_PROTOTYPE(Hud);
116 void Archive(
Archiver& arc)
override;
118 static Hud *Find(
int index);
119 static Hud *FindOrCreate(
int index);
120 static int GetFreeNumber(
void);
121 static void ProcessThink(
void);
122 static int Sort(
const void *elem1,
const void *elem2);
125 static void ArchiveFunction(
Archiver& arc);
129 Hud(
int client = -1);
139 void FadeThink(
void);
140 void MoveThink(
void);
141 void ScaleThink(
void);
142 void TimerThink(
void);
146 void FadeOverTime(
float time);
147 void MoveOverTime(
float time);
148 void ScaleOverTime(
float time,
short width,
short height);
150 void Refresh(
int clientNumber = -1);
156 void Set3D(
Vector vector_or_offset, qboolean always_show, qboolean depth,
int entnum = -1);
158 void SetAlignX(hudAlign_t align);
159 void SetAlignY(hudAlign_t align);
160 void SetAlpha(
float alpha);
161 void SetClient(
int clientnum, qboolean clears =
false);
162 void SetColor(
Vector color);
163 void SetFont(
const char *font);
164 void SetRectX(
short x);
165 void SetRectY(
short y);
166 void SetRectHeight(
short height);
167 void SetRectWidth(
short height);
168 void SetShader(
const char *shader,
float width,
float height);
169 void SetText(
const char *text);
170 void SetTimer(
float time,
float fade_at_time = -1.0f);
171 void SetTimerUp(
float time,
float fade_at_time = -1.0f);
172 void SetVirtualSize(qboolean virtualSize);
175 void EventGetAlignX(
Event *ev);
176 void EventGetAlignY(
Event *ev);
177 void EventGetAlpha(
Event *ev);
178 void EventGetColor(
Event *ev);
179 void EventGetFont(
Event *ev);
180 void EventGetHeight(
Event *ev);
181 void EventGetRectX(
Event *ev);
182 void EventGetRectY(
Event *ev);
183 void EventGetTime(
Event *ev);
184 void EventGetWidth(
Event *ev);
185 void EventFadeDone(
Event *ev);
186 void EventFadeOverTime(
Event *ev);
187 void EventMoveDone(
Event *ev);
188 void EventMoveOverTime(
Event *ev);
189 void EventRefresh(
Event *ev);
190 void EventScaleOverTime(
Event *ev);
191 void EventSet3D(
Event *ev);
192 void EventSetNon3D(
Event *ev);
193 void EventSetAlignX(
Event *ev);
194 void EventSetAlignY(
Event *ev);
195 void EventSetAlpha(
Event *ev);
196 void EventSetColor(
Event *ev);
197 void EventSetFont(
Event *ev);
198 void EventSetPlayer(
Event *ev);
199 void EventSetRectX(
Event *ev);
200 void EventSetRectY(
Event *ev);
201 void EventSetShader(
Event *ev);
202 void EventSetText(
Event *ev);
203 void EventSetTimer(
Event *ev);
204 void EventSetTimerUp(
Event *ev);
205 void EventSetVirtualSize(
Event *ev);