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