14{
15 if (!should_draw)
16 return;
18 {
19
20
23
25 localcmd(
"menu_cmd directmenu Uid2Name\n");
26
29 {
32 LOG_INFO(_(
"^1You must answer before entering HUD configure mode"));
34 }
37 }
38
40 {
42 return;
43
44
45
46
47
48
49
50
51
52
53
54 }
55 else
56 {
60 }
61
63 {
66 }
67
70 else
72
74 if (a <= 0)
75 return;
76
77
78
79
87
89 {
92 }
93
96
99 else
102
104 {
107 }
108
109
111 bool yes_on_top;
112 if (mySize.x / mySize.y > 3)
113 {
114 newSize.x = 3 * mySize.y;
115 newSize.y = mySize.y;
116
117 pos.x += (mySize.x - newSize.x) * 0.5;
118 yes_on_top = false;
119 }
120 else if (mySize.x / mySize.y > 3/2)
121 {
122 newSize.y = (1/3) * mySize.x;
123 newSize.x = mySize.x;
124
125 pos.y += (mySize.y - newSize.y) * 0.5;
126 yes_on_top = false;
127 }
128 else
129 {
130 newSize.y = (2/3) * mySize.x;
131 newSize.x = mySize.x;
132
133 pos.y += (mySize.y - newSize.y) * 0.5;
134 yes_on_top = true;
135 }
136 mySize = newSize;
137
139 ? _("Allow servers to store and display your name?")
140 : _("A vote has been called for:");
142
144 s = _("^1Configure the HUD");
145 else
148
149
150
151 float height = (yes_on_top ? 1.3/8 : 1.5/8);
156
157
158
159 pos.y += 5.2/8 * mySize.y;
160 vector tmp_size, pos_no, pos_yes = pos;
161 if (yes_on_top)
162 {
163 tmp_size =
vec2(mySize.x * 2, ((8 - 5.2) * 0.5 + 0.1) / 8 * mySize.y);
164
165 pos_no = pos +
eY * ((8 - 5.2) * 0.5 - 0.1) / 8 * mySize.y -
eX * mySize.x;
166
167
168
169 }
170 else
171 {
172 tmp_size =
vec2(mySize.x, (8 - 5.2) / 8 * mySize.y);
173 pos_no = pos;
174 mySize.x *= 0.5;
175 }
176
177
178 if (yes_on_top)
179 {
184 }
185 else
187
188
190 {
193 }
195 {
198 }
199
200
202 {
205 }
207 {
210 }
211
213}
#define MUTATOR_CALLHOOK(id,...)
void drawstring_aspect(vector pos, string text, vector sz, vector color, float theAlpha, float drawflag)
void drawcolorcodedstring_aspect(vector pos, string text, vector sz, float theAlpha, float drawflag)
#define drawsetcliparea(xposition, yposition, w, h)
#define drawpic_skin(pos, pic, sz, color, theAlpha, drawflag)
bool autocvar_hud_panel_vote
bool autocvar_hud_panel_vote_dynamichud
float autocvar_hud_panel_vote_alreadyvoted_alpha
int autocvar_cl_allow_uid2name
#define getcommandkey_forcename(cmd_name, command)
string textShortenToWidth(string theText, float maxWidth, vector theFontSize, textLengthUpToWidth_widthFunction_t tw)
const int SERVERFLAG_PLAYERSTATS
const float DRAWFLAG_NORMAL
void HUD_Panel_LoadCvars()
float autocvar__menu_alpha
#define HUD_Panel_DrawBg()
bool autocvar__hud_configure
float hud_configure_menu_open
noref float vid_conheight
ERASEABLE string ColorTranslateRGB(string s)
float stringwidth_colors(string s, vector theSize)