· 6 years ago · Dec 25, 2019, 06:48 AM
1#include "Menu.h"
2#include "TGFCfg.h"
3#include "../SDK/Vector.h"
4#include "../SDK/ISurface.h"
5#include "../Utils/Color.h"
6#include "../Utils/GlobalVars.h"
7#include "config.h"
8Menu g_Menu;
9
10bool manually_set_key = false;
11
12/*
13*
14* CREDITS TO : stickrpg
15*
16* BEST MENU FRAMEWORK IN EXISTENCE
17*
18*/
19enum TABS
20{
21 Aimbot = 0,
22 Visuals = 1,
23 Misc = 2
24};
25
26#define or ||
27#define and &&
28int TopLeftGroupBox_X = 5;
29int TopLeftGroupBox_X2 = 4;
30int TopLeftGroupBox_Y2 = 40 + (309 / 1.5) + 5;
31int TopLeftGroupBox_Y = 52 + (309 / 1.5) + 5;
32int GroupBoxSize_Width = 500 / 1.5;
33int GroupBoxSize_Height = 190 / 1.5; //30*
34int GroupBoxSize_Width2 = 440 / 1.5;
35int GroupBoxSize_Height2 = 150 / 1.5; //30*
36
37
38
39void GradientV(int x, int y, int w, int h, Color c1, Color c2)
40{
41 g_pSurface->FilledRect(x, y, w, h, c1);
42 BYTE first = c2.red;
43 BYTE second = c2.green;
44 BYTE third = c2.blue;
45 for (int i = 0; i < h; i++)
46 {
47 float fi = i, fh = h;
48 float a = fi / fh;
49 DWORD ia = a * 255;
50 g_pSurface->FilledRect(x, y + i, w, 1, Color(first, second, third, ia));
51 }
52}
53
54void GradientVEnd(int x, int y, int w, int h, Color c1, Color c2)
55{
56 //g_pSurface->FilledRect(x, y, w, h, c1);
57 BYTE first = c2.red;
58 BYTE second = c2.green;
59 BYTE third = c2.blue;
60 for (float i = 0; i < h / 1.5; i++)
61 {
62 float fi = i, fh = h / 1.5;
63 float a = fi / fh;
64 DWORD ia = a * 255;
65 g_pSurface->FilledRect(x, y + i, w, 2, Color(first, second, third, ia));
66 }
67}
68
69
70void DrawESPPlayersSubTab(int& current_players_esp_subtab, int tab_amount, Vector _pos, int MenuAlpha_Main)
71{
72 int in_sizew_esp_player_subtabs = (375 / 1.5) - 8;
73 static std::string ESP_Player_SubTabs_Names[3] = { "Main", "Main PT 2", "Model" };
74
75 for (int i = 0; i < tab_amount; i++)
76 {
77 RECT text_size2 = g_pSurface->GetTextSizeRect(Globals::SmallText, ESP_Player_SubTabs_Names[i].c_str());
78
79 int tab_area[4] = {
80 _pos.x + 9 + (i * (in_sizew_esp_player_subtabs / tab_amount)), _pos.y + 52 + 5,
81 (in_sizew_esp_player_subtabs / tab_amount), 20
82 };
83
84 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(tab_area[0], tab_area[1], tab_area[2],
85 tab_area[3]))
86 current_players_esp_subtab = i;
87
88 if (current_players_esp_subtab == i)
89 {
90 g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(0, 255, 255, MenuAlpha_Main));
91
92 g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(c_config::get().menu_color_r, c_config::get().menu_color_g, c_config::get().menu_color_b, MenuAlpha_Main));
93
94 g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
95 tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
96 Color(0, 255, 255, MenuAlpha_Main), Globals::SmallText, false,
97 ESP_Player_SubTabs_Names[i].c_str());
98 }
99 else
100 {
101 g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(127, 255, 0, MenuAlpha_Main));
102 g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(0, 139, 139, MenuAlpha_Main));
103
104 g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
105 tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
106 Color(0, 255, 255, MenuAlpha_Main), Globals::SmallText, false,
107 ESP_Player_SubTabs_Names[i].c_str());
108 }
109 }
110}
111
112void DrawAimbotTargetSubTab(int& current_players_esp_subtab, int tab_amount, Vector _pos, int MenuAlpha_Main)
113{
114 int in_sizew_esp_player_subtabs = (375 / 1.5) - 8;
115 static std::string ESP_Player_SubTabs_Names[2] = { "Target", "Body-Aim" };
116
117 for (int i = 0; i < tab_amount; i++)
118 {
119 RECT text_size2 = g_pSurface->GetTextSizeRect(Globals::SmallText, ESP_Player_SubTabs_Names[i].c_str());
120
121 int tab_area[4] = {
122 _pos.x + 9 + (i * (in_sizew_esp_player_subtabs / tab_amount)), _pos.y + TopLeftGroupBox_Y + 5,
123 (in_sizew_esp_player_subtabs / tab_amount), 20
124 };
125
126 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(tab_area[0], tab_area[1], tab_area[2],
127 tab_area[3]))
128 current_players_esp_subtab = i;
129
130
131 // g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(23, 23, 25, MenuAlpha_Main));
132
133 if (current_players_esp_subtab == i)
134 {
135 g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(0, 255, 255, MenuAlpha_Main));
136
137 g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(c_config::get().menu_color_r, c_config::get().menu_color_g, c_config::get().menu_color_b, MenuAlpha_Main));
138
139 g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
140 tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
141 Color(0, 255, 255, MenuAlpha_Main), Globals::SmallText, false,
142 ESP_Player_SubTabs_Names[i].c_str());
143 }
144 else
145 {
146 g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(127, 255, 0, MenuAlpha_Main));
147 g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(0, 139, 139, MenuAlpha_Main));
148
149 g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
150 tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
151 Color(0, 255, 255, MenuAlpha_Main), Globals::SmallText, false,
152 ESP_Player_SubTabs_Names[i].c_str());
153 }
154
155 }
156} //
157
158void DrawAimbotAccuracy_Subtab(int& current_players_esp_subtab, int tab_amount, Vector _pos, int MenuAlpha_Main)
159{
160 int in_sizew_esp_player_subtabs = GroupBoxSize_Width - 9;
161 static std::string ESP_Player_SubTabs_Names[6] = { "Auto", "Scout", "AWP", "H.Pistol", "Pistol", "Other" };
162
163 for (int i = 0; i < tab_amount; i++)
164 {
165 RECT text_size2 = g_pSurface->GetTextSizeRect(Globals::SmallText, ESP_Player_SubTabs_Names[i].c_str());
166
167 int tab_area[4] = { // 5 + 91
168 _pos.x + TopLeftGroupBox_X + GroupBoxSize_Width + 5 + 60 + (i * (in_sizew_esp_player_subtabs / tab_amount)),
169 _pos.y + 18 + 5, (in_sizew_esp_player_subtabs / tab_amount), 10
170 // _pos.y + 45 + 4, (in_sizew_esp_player_subtabs / tab_amount), 20
171 };
172
173
174 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(tab_area[0], tab_area[1], tab_area[2],
175 tab_area[3]))
176 current_players_esp_subtab = i;
177
178 if (current_players_esp_subtab == i)
179 {
180 g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(18, 18, 18, MenuAlpha_Main));
181
182 g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(c_config::get().menu_color_r, c_config::get().menu_color_g, c_config::get().menu_color_b, MenuAlpha_Main));
183
184 g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
185 tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
186 Color(255, 255, 255, MenuAlpha_Main), Globals::SmallText, false,
187 ESP_Player_SubTabs_Names[i].c_str());
188 }
189 else
190 {
191 g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(18, 18, 18, MenuAlpha_Main));
192 g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(0, 139, 139, MenuAlpha_Main));
193
194 g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
195 tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
196 Color(0, 255, 255, MenuAlpha_Main), Globals::SmallText, false,
197 ESP_Player_SubTabs_Names[i].c_str());
198 }
199 }
200}
201
202void DrawESPSECS_Subtab(int& current_players_esp_subtab, int tab_amount, Vector _pos, int MenuAlpha_Main)
203{
204 int in_sizew_esp_player_subtabs = GroupBoxSize_Width - 8;
205 static std::string ESP_Player_SubTabs_Names[2] = { "World", "Local" };
206
207 for (int i = 0; i < tab_amount; i++)
208 {
209 RECT text_size2 = g_pSurface->GetTextSizeRect(Globals::SmallText, ESP_Player_SubTabs_Names[i].c_str());
210
211 int tab_area[4] = {
212 //_pos.x + TopLeftGrouBox_X + GroupBoxSize_Width + 4 + 50 + (i * (in_sizew_esp_player_subtabs / tab_amount)), _pos.y + 40 + 5, (in_sizew_esp_player_subtabs / tab_amount), 20
213 _pos.x + TopLeftGroupBox_X + GroupBoxSize_Width + 4 + 50 + (i * (in_sizew_esp_player_subtabs / tab_amount)), _pos.y + 40 + 5,(in_sizew_esp_player_subtabs / tab_amount), 10
214 };
215
216 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(tab_area[0], tab_area[1], tab_area[2],
217 tab_area[3]))
218 current_players_esp_subtab = i;
219
220 if (current_players_esp_subtab == i)
221 {
222 g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(18, 18, 18, MenuAlpha_Main));
223
224 g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(c_config::get().menu_color_r, c_config::get().menu_color_g, c_config::get().menu_color_b, MenuAlpha_Main));
225
226 g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
227 tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
228 Color(255, 255, 255, MenuAlpha_Main), Globals::SmallText, false,
229 ESP_Player_SubTabs_Names[i].c_str());
230 }
231 else
232 {
233 g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(18, 18, 18, MenuAlpha_Main));
234 g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(0, 139, 139, MenuAlpha_Main));
235
236 g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
237 tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
238 Color(0, 255, 255, MenuAlpha_Main), Globals::SmallText, false,
239 ESP_Player_SubTabs_Names[i].c_str());
240 }
241 }
242}
243
244void DrawESPSP_Subtab(int& current_players_esp_subtab, int tab_amount, Vector _pos, int MenuAlpha_Main)
245{
246 int in_sizew_esp_player_subtabs = GroupBoxSize_Width - 7;
247 static std::string ESP_Player_SubTabs_Names[3] = { "GENERAL", "CHAMS", "MISC" };
248
249 for (int i = 0; i < tab_amount; i++)
250 {
251 RECT text_size2 = g_pSurface->GetTextSizeRect(Globals::menu_font, ESP_Player_SubTabs_Names[i].c_str());
252
253 int tab_area[4] = {
254 _pos.x + 20 + (i * (in_sizew_esp_player_subtabs / tab_amount)), _pos.y + 100 + 5,(in_sizew_esp_player_subtabs / tab_amount), 10};
255
256 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(tab_area[0], tab_area[1], tab_area[2],
257 tab_area[3]))
258 current_players_esp_subtab = i;
259
260 if (current_players_esp_subtab == i)
261 {
262 g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(27, 23, 68, 255));
263
264 // g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(c_config::get().menu_color_r, c_config::get().menu_color_g, c_config::get().menu_color_b, MenuAlpha_Main));
265
266 g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
267 tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
268 Color(255, 255, 255, 255), Globals::menu_font, false,
269 ESP_Player_SubTabs_Names[i].c_str());
270 }
271 else
272 {
273 // g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(18, 18, 18, MenuAlpha_Main));
274 // g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(0, 139, 139, MenuAlpha_Main));
275
276 g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)), tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2), Color(255, 255, 255, 255), Globals::menu_font, false, ESP_Player_SubTabs_Names[i].c_str());
277 }
278 }
279} //
280
281void DrawAntiAim_Subtab(int& current_players_esp_subtab, int tab_amount, Vector _pos, int MenuAlpha_Main)
282{
283 int in_sizew_esp_player_subtabs = GroupBoxSize_Width - 7;
284 static std::string ESP_Player_SubTabs_Names[3] = { "General", "Pitch/Yaw", "LBY Breaker" };
285
286 for (int i = 0; i < tab_amount; i++)
287 {
288 RECT text_size2 = g_pSurface->GetTextSizeRect(Globals::SmallText, ESP_Player_SubTabs_Names[i].c_str());
289
290 int tab_area[4] = {
291 // _pos.x + TopLeftGroupBox_X + GroupBoxSize_Width + 4 + 90 + (i * (in_sizew_esp_player_subtabs / tab_amount)),
292 // _pos.y + 20 + 3, (in_sizew_esp_player_subtabs / tab_amount), 20
293
294
295
296
297
298 _pos.x + 40 + (i * (in_sizew_esp_player_subtabs / tab_amount)), _pos.y + 30 + 5,(in_sizew_esp_player_subtabs / tab_amount), 10
299
300
301
302 // _pos.x + 52 + (i * (in_sizew_esp_player_subtabs / tab_amount)), _pos.y + 52 + 3,(in_sizew_esp_player_subtabs / tab_amount), 20
303 };
304
305 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(tab_area[0], tab_area[1], tab_area[2],
306 tab_area[3]))
307 current_players_esp_subtab = i;
308
309 if (current_players_esp_subtab == i)
310 {
311 g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(18, 18, 18, MenuAlpha_Main));
312
313 g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(c_config::get().menu_color_r, c_config::get().menu_color_g, c_config::get().menu_color_b, MenuAlpha_Main));
314
315 g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
316 tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
317 Color(255, 255, 255, MenuAlpha_Main), Globals::SmallText, false,
318 ESP_Player_SubTabs_Names[i].c_str());
319 }
320 else
321 {
322 g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(18, 18, 18, MenuAlpha_Main));
323 g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(0, 139, 139, MenuAlpha_Main));
324
325 g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
326 tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
327 Color(0, 255, 255, MenuAlpha_Main), Globals::SmallText, false,
328 ESP_Player_SubTabs_Names[i].c_str());
329 }
330 }
331} //
332#include <tuple>
333
334class vars : public singleton< vars > {
335private:
336
337public:
338 bool visuals_box = false;
339};
340
341void DrawAimbotMain_Subtab(int& current_players_esp_subtab, int tab_amount, Vector _pos, int MenuAlpha_Main)
342{
343 int in_sizew_esp_player_subtabs = GroupBoxSize_Width - 8;
344 static std::string ESP_Player_SubTabs_Names[2] = { "Main", "Resolver" };
345
346 for (int i = 0; i < tab_amount; i++)
347 {
348 RECT text_size2 = g_pSurface->GetTextSizeRect(Globals::SmallText, ESP_Player_SubTabs_Names[i].c_str());
349
350 int tab_area[4] = {
351 _pos.x + 9 + (i * (in_sizew_esp_player_subtabs / tab_amount)), _pos.y + 52 + 5,
352 (in_sizew_esp_player_subtabs / tab_amount), 20
353 };
354
355 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(tab_area[0], tab_area[1], tab_area[2],
356 tab_area[3]))
357 current_players_esp_subtab = i;
358
359
360
361 if (current_players_esp_subtab == i)
362 {
363 g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(0, 255, 255, MenuAlpha_Main));
364
365 g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(c_config::get().menu_color_r, c_config::get().menu_color_g, c_config::get().menu_color_b, MenuAlpha_Main));
366
367 g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
368 tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
369 Color(0, 255, 255, MenuAlpha_Main), Globals::SmallText, false,
370 ESP_Player_SubTabs_Names[i].c_str());
371 }
372 else
373 {
374 g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(127, 255, 0, MenuAlpha_Main));
375 g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(0, 139, 139, MenuAlpha_Main));
376
377 g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
378 tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
379 Color(0, 255, 255, MenuAlpha_Main), Globals::SmallText, false,
380 ESP_Player_SubTabs_Names[i].c_str());
381 }
382
383 // g_pSurface->OutlinedRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(40, 44, 53, MenuAlpha_Main));
384 }
385} //
386
387std::ptrdiff_t ExtraOffsets::deadflag = NULL;
388std::string config_slots[14] = {
389 "legit 1", "legit 2", "legit 3", "legit 4", "legit 5", "hvh 1", "hvh 2", "hvh 3", "hvh 4", "hvh 5", "custom 1", "custom 2",
390 "custom 3", "custom 4"
391};
392
393
394static int save_slot = 0;
395#include "../Features/Visuals/EventLogging.h"
396void Save_Config()
397{
398 Config2->Save(config_slots[save_slot]);
399
400 std::string string_to_add;
401 string_to_add += "saved '";
402 string_to_add += config_slots[save_slot];
403 string_to_add += "'.";
404
405 c_event_logs::get().add(string_to_add, Color(255, 255, 255, 255));
406}
407
408
409void Load_Config()
410{
411 Config2->Load(config_slots[save_slot]);
412
413 std::string string_to_add;
414 string_to_add += "loaded '";
415 string_to_add += config_slots[save_slot];
416 string_to_add += "'.";
417
418 c_event_logs::get().add(string_to_add, Color(255, 255, 255, 255));
419}
420
421
422
423void Export_Config()
424{
425 Config2->export_to_clipboard("export");
426}
427
428void Import_Config()
429{
430 Config2->import_from_clipboard("import");
431}
432
433void Save()
434{
435 std::string ConfigName;
436
437 switch (2)
438 {
439 case 0: ConfigName = "1";
440 break;
441 case 1: ConfigName = "2";
442 break;
443 case 2: ConfigName = "3";
444 break;
445 case 3: ConfigName = "4";
446 break;
447 case 4: ConfigName = "5";
448 break;
449 }
450 Config2->Save(ConfigName);
451}
452void SkinTrolling()
453{
454 static auto nameConvar = g_pCvar->FindVar("name");
455 nameConvar->fnChangeCallback = 0;
456
457 static auto do_once = (nameConvar->SetValue("\n���"), true);
458
459 nameConvar->SetValue(u8" \x01\x0B\x10 sizzeR \x01has opened a container and found:\x02 ★ M9 Bayonet | Doppler");
460}
461
462void GradientH(int x, int y, int w, int h, Color c1, Color c2)
463{
464 g_pSurface->FilledRect(x, y, w, h, c1);
465 BYTE first = c2.red;
466 BYTE second = c2.green;
467 BYTE third = c2.blue;
468 for (int i = 0; i < w; i++)
469 {
470 float fi = i, fw = w;
471 float a = fi / fw;
472 DWORD ia = a * 255;
473 g_pSurface->FilledRect(x + i, y, 1, h, Color(first, second, third, ia));
474 }
475}
476
477#include <experimental/filesystem>
478#include <filesystem>
479#include <iostream>
480
481#include <iostream>
482#include <iomanip>
483#include <fstream>
484using namespace std;
485#include "../SDK/ClientClass.h"
486#include "../SDK/IBaseClientDll.h"
487
488
489DWORD FindSig(DWORD dwAddress, DWORD dwLength, const char* szPattern)
490{
491 if (!dwAddress || !dwLength || !szPattern)
492 return 0;
493
494 const char* pat = szPattern;
495 DWORD firstMatch = NULL;
496
497 for (DWORD pCur = dwAddress; pCur < dwLength; pCur++)
498 {
499 if (!*pat)
500 return firstMatch;
501
502 if (*(PBYTE)pat == '\?' || *(BYTE*)pCur == GET_BYTE(pat))
503 {
504 if (!firstMatch)
505 firstMatch = pCur;
506
507 if (!pat[2])
508 return firstMatch;
509
510 if (*(PWORD)pat == '\?\?' || *(PBYTE)pat != '\?')
511 pat += 3;
512
513 else pat += 2;
514 }
515 else
516 {
517 pat = szPattern;
518 firstMatch = 0;
519 }
520 }
521
522 return 0;
523}
524DWORD FindSignaturenew(const char* szModuleName, const char* PatternName, char* szPattern)
525{
526 HMODULE hModule = GetModuleHandleA(szModuleName);
527 PIMAGE_DOS_HEADER pDOSHeader = (PIMAGE_DOS_HEADER)hModule;
528 PIMAGE_NT_HEADERS pNTHeaders = (PIMAGE_NT_HEADERS)(((DWORD)hModule) + pDOSHeader->e_lfanew);
529
530 DWORD ret = FindSig(((DWORD)hModule) + pNTHeaders->OptionalHeader.BaseOfCode, ((DWORD)hModule) + pNTHeaders->OptionalHeader.SizeOfCode, szPattern);;
531
532 return ret;
533}
534
535void ForceDaUpdate() {
536
537}
538
539std::string text_uwu;
540bool dont_recieve_input = false;
541
542
543void Menu::Render()
544{
545 static bool _pressed = true;
546
547 if (!_pressed && GetAsyncKeyState(VK_INSERT))
548 _pressed = true;
549 else if (_pressed && !GetAsyncKeyState(VK_INSERT))
550 {
551 _pressed = false;
552 menuOpened = !menuOpened;
553 }
554 g_pEngine->GetScreenSize(screen_width, screen_width);
555 static Vector2D _mouse_pos;
556 static int groupbox_bottom;
557 static int _drag_x = 300;
558 static int _drag_y = 300;
559 static int _drag1_x = 300;
560 static int _drag1_y = 300;
561 int _widthbggang = 595; // parte de tras
562 int _heightbggang = 693; // parte de tras
563 int _widthtdatras = 615; // parte de tras
564 int _heightabs = 25; // parte de tras
565 int _widthtabs = 690; // parte de tras
566 int _heightdatras = 710; // parte de tras
567 int _widthrbline = 595; // linha rainbow
568 int _heightrbline = 3; // linha rainbow
569 int _width1 = 600;
570 int _width = 550;
571 int _height = 650; //
572 int _height1 = 200; //
573 static Vector2D oldPos;
574 static Vector2D mousePos;
575 static bool _dragging = false;
576 bool _click = false;
577 static bool _resizing = false;
578 if (c_config::get().antiaim && c_config::get().DesyncAngle)
579 {
580 static bool changed_FakeSide = false;
581 if (!changed_FakeSide && GetAsyncKeyState(c_config::get().desync_switch_bind))
582 changed_FakeSide = true;
583 else if (changed_FakeSide && !GetAsyncKeyState(c_config::get().desync_switch_bind))
584 {
585 changed_FakeSide = false;
586 if (c_config::get().FakeSide == 0)
587 c_config::get().FakeSide = 2;
588 else
589 c_config::get().FakeSide = 0;
590 }
591 }
592 g_InputSystem->EnableInput(!menuOpened);
593 if (menuOpened)
594 {
595 MenuAlpha_Main = min(MenuAlpha_Main + 15, 255);
596 MenuAlpha_Text = min(MenuAlpha_Text + 5, 255);
597
598 //MenuAlpha_Main = 255;
599 //MenuAlpha_Text = 255;
600
601 if (GetAsyncKeyState(VK_LBUTTON))
602 _click = true;
603
604 Vector2D _mouse_pos = g_pSurface->GetMousePosition();
605
606 if (_dragging and !_click)
607 _dragging = false;
608
609 if (_resizing and !_click)
610 _resizing = false;
611
612 if (_dragging and _click)
613 {
614 _pos.x = _mouse_pos.x - _drag_x;
615 _pos.y = _mouse_pos.y - _drag_y;
616 _pos1.x = _mouse_pos.x - _drag1_x;
617 _pos1.y = _mouse_pos.y - _drag1_y;
618 }
619
620
621 //if (_resizing && _click) {
622 // _width = _mouse_pos.x - _pos.x;
623 // _height = _mouse_pos.y - _pos.y;
624
625 // if (_width < 480) _width = 480;
626 // if (_height < 340) _height = 340;
627
628 // if (_width > 960) _width = 960;
629 // if (_height > 680) _height = 680;
630 //}
631
632
633 if (g_pSurface->MouseInRegion(_pos.x - 96, _pos.y + 11, _width - 10, 13))
634 {
635 _dragging = true;
636 _drag_x = _mouse_pos.x - _pos.x;
637 _drag_y = _mouse_pos.y - _pos.y;
638 _pos1.x = _mouse_pos.x - _drag1_x;
639 _pos1.y = _mouse_pos.y - _drag1_y;
640 }
641
642 // if (mouse_in_params(_pos.x + 20, _pos.y + 20, _width - 10, _height - 10))
643 // {
644 // _resizing = true;
645 // }
646 }
647 else
648 {
649 MenuAlpha_Main = max(MenuAlpha_Main - 15, 0);
650 MenuAlpha_Text = max(MenuAlpha_Text - 25, 0);
651 //MenuAlpha_Main = 0;
652 //MenuAlpha_Text = 0;
653 }
654
655 //if (!menuOpened)
656 // return;
657
658
659 if (menuOpened) {
660
661 }
662 else {
663
664 }
665
666 int sum = 0;
667 int x;
668 ifstream inFile;
669
670 string path;
671 static string username;
672 static string rent;
673
674 static bool GrabName = true;
675
676 if (GrabName) {
677 path = getenv("appdata");
678 //cout << "appdata=" << path << endl;
679 path += "\\xy0_login";
680
681 inFile.open(path);
682 inFile >> username >> rent;
683 cout << username << rent << endl;
684
685 GrabName = false;
686 }
687
688
689 if (!menuOpened)
690 return;
691
692/*
693 Color menu_accent(59, 59, 78);
694 Color menu_accent2(28, 38, 43);
695 Color menu_outline(0, 0, 0);
696 Color menu_accent3(30, 30, 39);
697 Color menu_accent4(20, 143, 250);
698 int clr = (menu_accent.red + menu_accent.green + menu_accent.blue) / 3;
699 g_pSurface->OutlinedRect(_pos.x - 1, _pos.y - 1, _width + 2, _height + 2, menu_outline);
700 g_pSurface->FilledRect(_pos.x, _pos.y, _width, _height, menu_accent2);
701 g_pSurface->FilledRect(_pos.x + 15, _pos.y + 10, 670, 40, menu_accent3);
702 g_pSurface->FilledRect(_pos.x + 15, _pos.y + 45, 670, 2, menu_accent4);
703 g_pSurface->DrawT(_pos.x + 18, _pos.y + 15, Color(180, 180, 180), Globals::menu_font, false, "MOONWARE.XYZ |");
704 g_pSurface->DrawT(_pos.x + 18, _pos.y + 682, Color(180, 180, 180), Globals::menu_font, false, "MOONWARE.XYZ Welcome Admin 21:30:17 Beta Release ");*/
705 int _width2 = 750;
706 int _height2 = 660; //
707 Color menu_accent(17, 18, 16);
708 Color menu_accent2(28, 38, 43);
709 Color menu_outline(17,18,16);
710 Color menu_outlinee(16, 15, 36);
711 Color menu_accent3(30, 30, 39);
712 Color menu_accent4(20, 143, 250);
713 static double rainbow;
714 rainbow += 0.001;
715 if (rainbow > 1.f)
716 rainbow = 0;
717 Color color = Color::FromHSB(rainbow, 1.f, 1.f);
718 static double rainbow1;
719 rainbow1 += 0.001;
720 if (rainbow1 > 1.f)
721 rainbow1 = 0;
722 g_pSurface->FilledRect(_pos.x, _pos.y, _width2, _height2, menu_outlinee);
723 g_pSurface->FilledRect(_pos.x, _pos.y, _width2, 80, Color(24, 18, 61));
724 g_pSurface->OutlinedRect(_pos.x + 15, _pos.y + 100, 720, 545, Color(24, 19, 48));
725 g_pSurface->FilledRect(_pos.x + 15, _pos.y + 100, 720, 545, Color(24, 18, 61));
726 g_pSurface->FilledRect(_pos.x + 15, _pos.y + 100, 720, 30, Color(27, 23, 68));
727 g_pSurface->OutlinedRect(_pos.x + 15, _pos.y + 100, 720, 30, Color(31, 25, 64));
728 g_pSurface->DrawT(_pos.x + 20, _pos.y + 20, Color(255, 255, 255), Globals::FATALMENU, false, "MOONWARE.XYZ");
729 GradientH(_pos.x, _pos.y + 8, _width2, 1, Color::FromHSB(rainbow, 1.f, 1.f), Color::FromHSB1(fmod(GetTickCount()* 0.0002f, 1.f), 3.f, 3.f));
730 /*// FATALITY LOGO
731 g_pSurface->FilledRect(500, 150, 40, 40, Color(0, 3, 28));
732 g_pSurface->OutlinedRect(500, 150, 40, 40, Color(0, 3, 56));
733 g_pSurface->DrawT(514, 157, Color(244, 64, 132), Globals::SmallText, false, "S");
734 g_pSurface->OutlinedRect(505, 155, 30, 30, Color(0, 3, 56));
735 //FPS TIME SPEED
736
737 g_pSurface->FilledRect(337, 150, 160, 40, Color(0, 3, 28));
738 g_pSurface->OutlinedRect(337, 150, 160, 40, Color(0, 3, 56));
739 g_pSurface->OutlinedRect(342, 155, 150, 30, Color(0, 3, 56));
740 g_pSurface->DrawT(352, 170, Color(255, 255, 255), Globals::WATERMARK, false, "fps ping speed tick");
741 g_pSurface->DrawT(350, 158, Color(166, 228, 0), Globals::WATERMARK, false, " 604 0 0 0");
742 //g_pSurface->DrawT(350, 158, Color(255, 255, 255), Globals::WATERMARK, false, " 41 0 64");
743 // TIME
744
745 g_pSurface->FilledRect(245, 150, 89, 40, Color(0, 3, 28));
746 g_pSurface->OutlinedRect(245, 150, 89, 40, Color(0, 3, 56));
747 g_pSurface->OutlinedRect(250, 155, 79, 30, Color(0, 3, 56));
748 g_pSurface->DrawT(258, 170, Color(255, 255, 255), Globals::WATERMARK, false, "current time");
749 g_pSurface->DrawT(270, 158, Color(0, 142, 222), Globals::WATERMARK, false, "21:40:55");
750*/
751
752
753//g_pSurface->OutlinedRect(_pos.x, _pos.y, _width, _height, Color(65, 63, 63, MenuAlpha_Main));
754//g_pSurface->OutlinedRect(_pos.x, _pos.y + 19, _width, 1, Color(65, 63, 63, MenuAlpha_Main));
755
756 int in_sizew = 450;
757
758 static int tab_selected = 0;
759 static const int tab_amount = 6;
760 static std::string tab_names[tab_amount] = { "RAGE", "ANTIAIM", "ESP", "MISC", "SKINS", "CUSTOM" };
761
762 for (int i = 0; i < tab_amount; i++)
763 {
764 RECT text_size = g_pSurface->GetTextSizeRect(Globals::TabFont, tab_names[i].c_str());
765
766 int tab_area[4] = { _pos.x + 260 + (i * (in_sizew / tab_amount)), _pos.y + 35, (in_sizew / tab_amount), 20 }; tab_area[1] = tab_area[1] - 5; if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(tab_area[0], tab_area[1], tab_area[2], tab_area[3])) tab_selected = i;
767
768 if (tab_selected == i)
769 {
770
771
772 g_pSurface->DrawT(tab_area[0], tab_area[1], Color(255, 255, 255, MenuAlpha_Text), Globals::menu_font, false, tab_names[i].c_str());
773 }
774 else
775 {
776 g_pSurface->DrawT(tab_area[0], tab_area[1], Color(255, 255, 255, MenuAlpha_Text), Globals::menu_font, false, tab_names[i].c_str());
777 }
778
779
780 //g_pSurface->Line(tab_area[0] - 10, tab_area[1] + 5, tab_area[0] - 13, tab_area[1] + tab_area[3] - 10, Color(91, 95, 97, MenuAlpha_Main));
781 }
782 static int aimbot_main_subtab = 0;
783 std::string pitch[6] = { "Disabled", "Down", "Up", "Origin", "Offset", "Fake Down" };
784
785 std::string BodyAimOptions[5] = { "In Air", "Slowwalk", "Inaccuracy", "Vulnerable", "Lethal" };
786
787 std::string AutoStopOptions[4] = { "Minimum", "Full Stop", "Custom" };
788 std::string AutoStops[3] = { "Moving", "Standing", "Air" };
789 std::string AutoStopOptions2[6] = { "Auto", "Scout", "AWP", "H.Pistol", "Pistol", "Other" };
790 std::string jebne[2] = { "kokot", "kurwa" };
791 std::string BodyAimModeOptions[2] = { "Prefer", "Force" };
792
793 std::string Hitboxes[6] = { "Head", "Neck", "Arms", "Pelvis", "Stomach", "Legs" };
794
795 // EVERY STRING BELOW HERE IS NEW
796
797 std::string resolver[4] = { "Onetap", "Fatality", "Experimental", "Bruteforce" };
798
799 std::string hcty[3] = { "Off", "Hitchance", "Spread Limit" };
800 std::string desync2[2] = { "none", "Static" };
801 std::string fltype[3] = { "Always", "Dynamic", "Switch" };
802 std::string freestand_mode2[3] = { "Threat", "Highest Damage", "Highest Hitchance" };
803 std::string test3[2] = { "Accuarcy boost", "Extended Backtrack" };
804 if (c_config::get().esppreview)
805 {
806 static int spec_x;
807 static int spec_y;
808
809 int pos_x = spec_x;
810 int pos_y = spec_y;
811 static int _drag_x = 300;
812 static int _drag_y = 300;
813
814 static bool _dragging = false;
815 bool _click = false;
816
817 if (GetAsyncKeyState(VK_LBUTTON))
818 _click = true;
819
820 Vector2D _mouse_pos = g_pSurface->GetMousePosition();
821
822 if (_dragging && !_click)
823 _dragging = false;
824
825 if (_dragging && _click)
826 {
827 pos_x = _mouse_pos.x - _drag_x;
828 pos_y = _mouse_pos.y - _drag_y;
829 spec_x = pos_x;
830 spec_y = pos_y;
831 }
832
833 int spec_width = 280;
834
835
836 int spec_height = 500;
837
838 if ((g_pSurface->MouseInRegion(pos_x + 400, pos_y, spec_width, spec_height - 140))) {
839 _dragging = true;
840 _drag_x = _mouse_pos.x - pos_x;
841 _drag_y = _mouse_pos.y - pos_y;
842 }
843
844 int wa, ha;
845 g_pEngine->GetScreenSize(wa, ha);
846
847 static double rainbow;
848 rainbow += 0.001;
849 if (rainbow > 1.f)
850 rainbow = 0;
851 Color color = Color::FromHSB(rainbow, 1.f, 1.f);
852 static double rainbow1;
853 rainbow1 += 0.001;
854 if (rainbow1 > 1.f)
855 rainbow1 = 0;
856
857 g_pSurface->FilledRect(pos_x + 400, pos_y, spec_width, 20, Color(24, 24, 24));
858
859
860
861
862 char loop_str[24];
863 sprintf_s(loop_str, "Visual Preview");
864 g_pSurface->DrawT(pos_x + 450, pos_y + 3, Color(180, 180, 180), Globals::SmallText, false, loop_str);
865 // g_pSurface->OutlinedRect(pos_x + 200, pos_y + 1, 100, 5, Color(255, 255, 255));
866 //g_pSurface->OutlinedRect(pos_x + 13, pos_y + 40, 50 - 26, 300 - 48, Color(255, 255, 255));
867 g_pSurface->FilledRect(pos_x + 400, pos_y + 23, spec_width, 20, Color(24, 24, 24));
868 // g_pSurface->DrawT(pos_x + 408, pos_y + 26, Color(180, 180, 180), Globals::SmallText, false, "[holding] slowwalk");
869 g_pSurface->FilledRect(pos_x + 400, pos_y + 43, spec_width, 20, Color(24, 24, 24));
870 g_pSurface->FilledRect(pos_x + 400, pos_y + 63, spec_width, 20, Color(24, 24, 24));
871 g_pSurface->FilledRect(pos_x + 400, pos_y + 83, spec_width, 20, Color(24, 24, 24));
872 g_pSurface->FilledRect(pos_x + 400, pos_y + 103, spec_width, 20, Color(24, 24, 24));
873 g_pSurface->FilledRect(pos_x + 400, pos_y + 123, spec_width, 20, Color(24, 24, 24));
874 g_pSurface->FilledRect(pos_x + 400, pos_y + 143, spec_width, 20, Color(24, 24, 24));
875 g_pSurface->FilledRect(pos_x + 400, pos_y + 163, spec_width, 20, Color(24, 24, 24));
876 g_pSurface->FilledRect(pos_x + 400, pos_y + 183, spec_width, 20, Color(24, 24, 24));
877 g_pSurface->FilledRect(pos_x + 400, pos_y + 203, spec_width, 20, Color(24, 24, 24));
878 g_pSurface->FilledRect(pos_x + 400, pos_y + 223, spec_width, 20, Color(24, 24, 24));
879 g_pSurface->FilledRect(pos_x + 400, pos_y + 243, spec_width, 20, Color(24, 24, 24));
880 g_pSurface->FilledRect(pos_x + 400, pos_y + 263, spec_width, 20, Color(24, 24, 24));
881 g_pSurface->FilledRect(pos_x + 400, pos_y + 283, spec_width, 20, Color(24, 24, 24));
882 g_pSurface->FilledRect(pos_x + 400, pos_y + 303, spec_width, 20, Color(24, 24, 24));
883 g_pSurface->FilledRect(pos_x + 400, pos_y + 323, spec_width, 20, Color(24, 24, 24));
884 g_pSurface->FilledRect(pos_x + 400, pos_y + 343, spec_width, 20, Color(24, 24, 24));
885 g_pSurface->FilledRect(pos_x + 400, pos_y + 363, spec_width, 20, Color(24, 24, 24));
886 g_pSurface->FilledRect(pos_x + 400, pos_y + 383, spec_width, 20, Color(24, 24, 24));
887
888 if (c_config::get().box_enemies)
889 {
890 g_pSurface->OutlinedRect(pos_x + 450, pos_y + 55, 150, 300, Color(180, 180, 180));
891 }
892 if (c_config::get().name_enemies)
893 {
894 char loop_str[24];
895 sprintf_s(loop_str, "COLLAPSE");
896 g_pSurface->DrawT(pos_x + 495, pos_y + 35, Color(180, 180, 180), Globals::SmallText, false, loop_str);
897 }
898 if (c_config::get().ammo_enemy)
899 {
900 g_pSurface->FilledRect(pos_x + 450, pos_y + 360, 150, 3, Color(81, 140, 201));
901 }
902 if (c_config::get().health_enemies == 1)
903 {
904 g_pSurface->FilledRect(pos_x + 442, pos_y + 55, 3, 300, Color(127, 255, 0));
905 }
906 if (c_config::get().flaags[0])
907 {
908 char loop_str[24];
909 sprintf_s(loop_str, "16000$");
910 g_pSurface->DrawT(pos_x + 600, pos_y + 55, Color(115, 180, 25), Globals::WeaponESP, false, loop_str);
911 }
912 if (c_config::get().flaags[1])
913 {
914 char loop_str[24];
915 sprintf_s(loop_str, "HK");
916 g_pSurface->DrawT(pos_x + 600, pos_y + 65, Color(150, 150, 150), Globals::WeaponESP, false, loop_str);
917 }
918
919 GradientV(_pos.x, _pos.y - 1, _width, 2, Color::FromHSB(rainbow, 1.f, 1.f), Color::FromHSB1(fmod(GetTickCount()* 0.0002f, 1.f), 3.f, 3.f));
920
921 //GradientV(_pos.x, _pos.y - 1, _width, 2, Color(220, 150, 80, MenuAlpha_Main), Color(250, 190, 0, MenuAlpha_Main));
922 GradientV(pos_x + 400, pos_y + 20, spec_width, 1, Color::FromHSB(rainbow, 1.f, 1.f), Color::FromHSB1(fmod(GetTickCount()* 0.0002f, 1.f), 3.f, 3.f));
923 if (c_config::get().flaags[2])
924 {
925 char loop_str[24];
926 sprintf_s(loop_str, "ZOOM");
927 g_pSurface->DrawT(pos_x + 600, pos_y + 75, Color(53, 166, 208), Globals::WeaponESP, false, loop_str);
928 }
929 if (c_config::get().weapon_enemies && c_config::get().show_icon_when_possible_enemies)
930 {
931 char loop_str[24];
932 sprintf_s(loop_str, "O");
933 g_pSurface->DrawT(pos_x + 500, pos_y + 370, Color(53, 166, 208), Globals::WeaponIcon, false, loop_str);
934 }
935 }
936 if (tab_selected == 3)
937 {
938 groupbox(40, 140, GroupBoxSize_Width, GroupBoxSize_Height + 363, "");
939 static int current_subtab_selection_esp = 0;
940 DrawESPSP_Subtab(current_subtab_selection_esp, 3, _pos, MenuAlpha_Main);
941 std::string gunmodel[5] = { "Flat", "Material", "Wireframe" ,"Pulse", "Eso" };
942 std::string WireFrameHands[3] = { "Disabled", "Invisible", "Chams" };
943 std::string EventLogsOptions[7] = { "purchases", "hurts", "kills", "spread miss", "occlusion miss", "resolver miss", "extended info" };
944 std::string skel[2] = { "Normal", "Backtrack" };
945
946 std::string Health_Type[3] = { "Disabled", "Normal", "Battery" };
947 std::string Health_Type22[3] = { "Disabled", "Bounding", "Octagon" };
948 std::string Hitmarker_Type[6] = { "Disabled", "Metallic", "Bubble", "Fatality", "Bameware", "Call Of Duty" };
949
950 std::string flags[4] = { "Money ($)", "Armor (HK/K)", "Zoom (ZOOM)", "Fakeduck (FAKEDUCK)" };
951
952 std::string indicators[5] = { "Choke", "Fake", "Lag Compensation", "Onetap old", "onetap v1" };
953
954 std::string removals[5] = { "Remove Visual Recoil Overlay", "Remove Scope Overlay", "Remove Postprocessing", "Remove Smoke", "Remove Flash" };
955 switch (current_subtab_selection_esp)
956 {
957
958 case 0:
959 {
960 checkbox("Enabled", &c_config::get().visuals_enabled);
961 color_selector("box_col", &c_config::get().box_esp_color_r, &c_config::get().box_esp_color_g,
962 &c_config::get().box_esp_color_b, &c_config::get().box_esp_color_a);
963 combobox(3, "Box Type", Health_Type22, &c_config::get().box_enemies);
964 color_selector("name_col", &c_config::get().name_esp_color_r, &c_config::get().name_esp_color_g,
965 &c_config::get().name_esp_color_b, &c_config::get().name_esp_color_a);
966 combobox(3, "Health", Health_Type, &c_config::get().health_enemies);
967 checkbox("Name", &c_config::get().name_enemies);
968 color_selector("weapon_col", &c_config::get().weapon_esp_color_r, &c_config::get().weapon_esp_color_g,
969 &c_config::get().weapon_esp_color_b, &c_config::get().weapon_esp_color_a);
970 checkbox("Weapon", &c_config::get().weapon_enemies);
971 if (c_config::get().weapon_enemies)
972 {
973 checkbox("Weapon Icons", &c_config::get().show_icon_when_possible_enemies);
974 }
975 checkbox("Ammo", &c_config::get().ammo_enemy); // made by random guy
976 checkbox("Enable flags", &c_config::get().flags_enemy);
977 if (c_config::get().flags_enemy)
978 {
979 MultiComboBox(4, "Flags Type", flags, c_config::get().flaags);
980 }
981 std::string glow_mode[3] = { "default", "pulse", "outline" };
982 color_selector("skel_col", &c_config::get().skel_color_r, &c_config::get().skel_color_g,
983 &c_config::get().skel_color_b, &c_config::get().skel_color_a);
984 MultiComboBox(2, "Draw Skeleton", skel, c_config::get().skeleton);
985
986
987 color_selector("hitbox_col", &c_config::get().hitbox_color_r,
988 &c_config::get().hitbox_color_g, &c_config::get().hitbox_color_b,
989 &c_config::get().hitbox_color_a);
990 checkbox("Draw Hitted Hitboxes", &c_config::get().drawhtbx);
991 slider(10, "Hitboxes duration", &c_config::get().htbxdur, "s", 1);
992 break;
993 }
994 case 1:
995 {
996 EmptySpace("");
997 std::string WireFrameHands[6] = { "Disabled", "Flat", "Material", "Metallic" , "Invisible", "Pulsing" };
998 std::string LocalChams[6] = { "Disabled", "Flat", "Material", "Metallic", "Invisible", "Eso" };
999 //std::string LocalChams[5] = { "Disabled", "Flat", "Material", "Eso", "Test" };
1000 std::string LocalChamsFake[5] = { "Disabled", "Flat","Material", "Metallic", "Pulsing" };
1001 std::string ChamsTypes[3] = { "Disabled", "Material", "Eso" };
1002 std::string glow_mode_local[3] = { "default", "pulse", "outline" };
1003 std::string glow_mode[3] = { "default", "pulse", "outline" };
1004 color_selector("glow_col", &c_config::get().glow_esp_color_r, &c_config::get().glow_esp_color_g,
1005 &c_config::get().glow_esp_color_b, &c_config::get().glow_esp_color_a);
1006 checkbox("Glow", &c_config::get().glow_enemies);
1007 color_selector("chams_col", &c_config::get().chams_esp_color_r, &c_config::get().chams_esp_color_g,
1008 &c_config::get().chams_esp_color_b, &c_config::get().chams_esp_color_a);
1009 checkbox("Chams", &c_config::get().chams_enemies);
1010 color_selector("chams_xqz_col", &c_config::get().chams_xqz_esp_color_r,
1011 &c_config::get().chams_xqz_esp_color_g, &c_config::get().chams_xqz_esp_color_b,
1012 &c_config::get().chams_xqz_esp_color_a);
1013 checkbox("Chams XQZ", &c_config::get().chams_xqz_enemies);
1014 color_selector("hand_cham_col", &c_config::get().hand_chams_color_r, &c_config::get().hand_chams_color_g,
1015 &c_config::get().hand_chams_color_b, &c_config::get().hand_chams_color_a);
1016 combobox(3, "Hands", WireFrameHands, &c_config::get().hand_chams);
1017 color_selector("local_cham_col", &c_config::get().local_chams_color_r, &c_config::get().local_chams_color_g,
1018 &c_config::get().local_chams_color_b, &c_config::get().local_chams_color_a);
1019 checkbox("Local Chams", &c_config::get().local_chams);
1020 color_selector("local_glow_col", &c_config::get().local_glow_color_r, &c_config::get().local_glow_color_g,
1021 &c_config::get().local_glow_color_b, &c_config::get().local_glow_color_a);
1022 checkbox("Local Glow", &c_config::get().local_glow);
1023 color_selector("fake_cham_col", &c_config::get().desync_chams_color_r, &c_config::get().desync_chams_color_g,
1024 &c_config::get().desync_chams_color_b, &c_config::get().desync_chams_color_a);
1025 checkbox("Fake chams", &c_config::get().fake_chams);
1026 MultiComboBox(5, "Indicators", indicators, c_config::get().indicators);
1027 break;
1028 }
1029
1030 case 2:
1031
1032 {
1033 checkbox("Spectator List", &c_config::get().visual_spectator_list);
1034 checkbox("Ragdoll Launchers", &c_config::get().ragdoll_launcher);
1035 // checkbox("kill animation", &c_config::get().ezkillcount);
1036 checkbox("Keybinds", &c_config::get().keysindicators);
1037 checkbox("esp preview", &c_config::get().esppreview);
1038 color_selector("player_indicator_col", &c_config::get().fov_arrows_esp_color_r,
1039 &c_config::get().fov_arrows_esp_color_g, &c_config::get().fov_arrows_esp_color_b,
1040 &c_config::get().fov_arrows_esp_color_a);
1041 checkbox("Out of FOV arrow", &c_config::get().fov_arrows_enemy);
1042 if (c_config::get().fov_arrows_enemy)
1043 {
1044 slider(30, "Size", &c_config::get().fov_arrows_enemy_size, "px", 1);
1045 slider(100, "Distance", &c_config::get().fov_arrows_enemy_distance, "%", 1);
1046 checkbox("Always indicate", &c_config::get().fov_arrows_always_indicate);
1047 }
1048 checkbox("Aspect Ratio Changer", &c_config::get().aspectchanger);
1049 slider(100, "Aspect Ratio", &c_config::get().aspectslide, "°", 1);
1050 checkbox("Bomb Timer", &c_config::get().bombtimer);
1051 checkbox("Lefthanded Knife", &c_config::get().leftknife);
1052 checkbox("Reveal On Radar", &c_config::get().visuals_radar);
1053 checkbox("Grenade Trajectory", &c_config::get().grenade_prediction);
1054 color_selector("bullet_tracer_color", &c_config::get().bullet_tracers_color_r, &c_config::get().bullet_tracers_color_g,
1055 &c_config::get().bullet_tracers_color_b, &c_config::get().bullet_tracers_color_a);
1056 checkbox("Bullet Tracers", &c_config::get().visuals_bullet_tracers);
1057 if (c_config::get().visuals_bullet_tracers) {
1058 color_selector("bullet_enemy_tracer_color", &c_config::get().bullet_enemy_tracers_color_r, &c_config::get().bullet_enemy_tracers_color_g,
1059 &c_config::get().bullet_enemy_tracers_color_b, &c_config::get().bullet_enemy_tracers_color_a);
1060 checkbox("Enemy Bullet Tracers", &c_config::get().visuals_enemy_bullet_tracers);
1061 color_selector("bullet_team_tracer_color", &c_config::get().bullet_team_tracers_color_r, &c_config::get().bullet_team_tracers_color_g,
1062 &c_config::get().bullet_team_tracers_color_b, &c_config::get().bullet_team_tracers_color_a);
1063 checkbox("Team Bullet Tracers", &c_config::get().visuals_team_bullet_tracers);
1064 string Tracer_style[2] = { "Beam", "Laser" };
1065 slider(10, "Bullet Tracers Life", &c_config::get().bullet_tracer_life, " sec", 1);
1066 combobox(2, "Bullet Tracer Style", Tracer_style, &c_config::get().bullet_tracer_style);
1067 checkbox("Bullet Impacts", &c_config::get().impacts);
1068 }
1069 break;
1070 }
1071
1072 }
1073 groupbox(390, 140, GroupBoxSize_Width, GroupBoxSize_Height + 363, "");
1074 MultiComboBox(7, "Event Logger", EventLogsOptions, c_config::get().event_logger);
1075 EmptySpace("Thirdperson Key");
1076 keybind(&c_config::get().thirdperson_bind, "a");
1077 slider(135, "Thirdperson Distance", &c_config::get().thirdperson_distance, "°", 1);
1078 slider(135, "Field Of View", &c_config::get().fov, "°", 1);
1079 checkbox("Retain FOV When Scoped", &c_config::get().fov_while_zoomed);
1080 slider(135, "Viewmodel Field Of View", &c_config::get().viewmodel_fov, "°", 1);
1081 MultiComboBox(5, "Removals", removals, c_config::get().removals);
1082 if (c_config::get().removals[1])
1083 {
1084 checkbox("Display spread with scope", &c_config::get().dynamic_scope);
1085 }
1086 checkbox("Preserve Killfeed", &c_config::get().visual_preserve_killfeed);
1087 if (c_config::get().visual_preserve_killfeed) slider(300, "Killfeed Time", &c_config::get().killfeedtime, "s", 1);
1088 checkbox("Nightmode", &c_config::get().nightmode);
1089 checkbox("Fullbright", &c_config::get().fullbright);
1090 checkbox("Transparent Props", &c_config::get().transparent_props);
1091 checkbox("Hit Marker", &c_config::get().hitmarker);
1092 combobox(6, "Hit Marker Sound", Hitmarker_Type, &c_config::get().hitmarker_sound);
1093 checkbox("Force Crosshair Overlay", &c_config::get().force_crosshair);
1094 checkbox("Penetration Crosshair Overlay", &c_config::get().penetration_crosshair);
1095 checkbox("Disable Thirdperson on Nade", &c_config::get().disabletpnade);
1096
1097
1098 }
1099 else if (tab_selected == 1)
1100 {
1101 groupbox(40, 140, GroupBoxSize_Width, GroupBoxSize_Height + 363, "");
1102 std::string AutoStopOptions22[12] = { "Backwards", "Sideways1", "Sideways2", "Switch" , "Spin" , "Freestanding", "Fixed", "View", "Legit AA", "Test", "AutoDesync", "dangerzonetest" };
1103 std::string AutoStopOptions33[10] = { "Down", "Nazi Down", "Half Down", "Zero", "Up", "Jitter Up/Down", "Custom", "Nospread", "Nospread 2", "View"};
1104 std::string AutoStopOptions44[4] = { "Offset", "Random", "Jitter Desync", "Slide" };
1105 std::string AutoStopOptions55[3] = { "Normal", "Experimental", "Maximum" };
1106 checkbox("Enable", &c_config::get().antiaim);
1107 //ComboBox("Anti Aim Flags", { "On Ground", "In Air" }, &AntiAimFlag);
1108 combobox(12, "Yaws", AutoStopOptions22, &c_config::get().YawMode);
1109 if (c_config::get().YawMode == 4)
1110 slider(1000, "Spin Speed", &c_config::get().SpeedSpin, "", 1);
1111
1112 if (c_config::get().YawMode == 7)
1113 slider(360, "Fixed Yaw Value", &c_config::get().FixedCustomYaw, "", 1);
1114 slider(360, "Jitter Range", &c_config::get().JitterRange, "", 1);
1115 combobox(4, "Jitter Mode", AutoStopOptions44, &c_config::get().JitterMode);
1116 if (c_config::get().JitterMode == 3)
1117 slider(100, "Slide Speed", &c_config::get().SlideSpeed, "", 1);
1118 combobox(10, "Pitch", AutoStopOptions33, &c_config::get().PitchMode);
1119
1120 if (c_config::get().PitchMode == 6)
1121 slider(180, "Custom Pitch", &c_config::get().CustomPitchValue, "", 1);
1122 if (c_config::get().YawMode == 0)
1123 {
1124 slider(360, "Body Lean", &c_config::get().BodyLean, "", 1);
1125 slider(360, "Body Lean Inverted", &c_config::get().BodyLeanInverted, "", 1);
1126 }
1127 checkbox("Desync Angle", &c_config::get().DesyncAngle);
1128 if (c_config::get().DesyncAngle)
1129 {
1130 if (c_config::get().YawMode != 9)
1131 combobox(3, "Desync Mode", AutoStopOptions55, &c_config::get().DesyncMode);
1132 EmptySpace("Desync Invert");
1133 keybind(&c_config::get().DesyncInvertKey, "a");
1134 //ComboBox("Desync Fake Side Key", { "Mouse 1", "Mouse 2", "Middle Mouse", "Mouse 5", "Mouse 4", "Left Shift", "Left Control", "Left Arrow", "Up Arrow", "Right Arrow", "Down Arrow", "C Key", "H Key", "X Key", "V Key" }, &c_config::get().FakeSideHotkey);
1135 }
1136 EmptySpace("");
1137 EmptySpace("");
1138
1139 groupbox(365, 50, GroupBoxSize_Width, GroupBoxSize_Height + 70, "test");
1140 checkbox("Enable Fakelag", &c_config::get().enable_fakelag);
1141 std::string fakelag_mode[3] = { "Off","Factor", "Adaptive" };
1142 combobox(4, "Mode", fakelag_mode, &c_config::get().FakeLagType);
1143 slider(20, "Value", &c_config::get().FakeLagValue, "", 1);
1144 slider(20, "Value In Air", &c_config::get().FakeLagValueGround, "", 1);
1145
1146 //color_selector("lag_col", &c_config::get().lag_color_r, &c_config::get().lag_color_g, &c_config::get().lag_color_b, &c_config::get().lag_color_a);
1147 //checkbox("Fake-lag visualisation", &c_config::get().fakechams);
1148 groupbox(365, 335, GroupBoxSize_Width, GroupBoxSize_Height + 50, "test");
1149
1150 slider(100, "Slow Walk", &c_config::get().slowwalk_speed, "%", 1);
1151 checkbox("Fix Leg Movement", &c_config::get().fixleg);
1152 checkbox("Infinite duck", &c_config::get().misc_fastcrouch);
1153 checkbox("On Shot Anti-Aim", &c_config::get().on_shot_aa);
1154 //button(SkinTrolling, "Skin Trolling");
1155 }
1156 else if (tab_selected == 2) {
1157 std::string legitaa[1] = { "Static" };
1158 groupbox(40, 140, GroupBoxSize_Width, GroupBoxSize_Height + 363, "");
1159 EmptySpace("");
1160 checkbox("Enabled", &c_config::get().legit_aimbot_enabled);
1161 checkbox("Backtrack", &c_config::get().legit_aimbot_backtrack);
1162 slider(180, "FOV", &c_config::get().legit_aimbot_fov, "", 1);
1163 EmptySpace("");
1164 slider(100, "Smooth", &c_config::get().linear_progression_threshold, "", 1);
1165 checkbox("Recoil Compensation", &c_config::get().rcs);
1166 EmptySpace("");
1167 slider(100, "Rcs", &c_config::get().RCSamount, "", 1);
1168 groupbox(365, 50, GroupBoxSize_Width, GroupBoxSize_Height + 70, "test");
1169
1170 groupbox(365, 335, GroupBoxSize_Width, GroupBoxSize_Height + 50, "test");
1171
1172 }
1173 else if (tab_selected == 0)
1174 {
1175 groupbox(40, 140, GroupBoxSize_Width, GroupBoxSize_Height + 363, "");
1176
1177 checkbox("Enabled", &c_config::get().aimbot_enabled);
1178
1179 combobox(3, "Target selection", freestand_mode2, &c_config::get().antiaim_freestanding_mod2e);
1180
1181 checkbox("Auto Scope", &c_config::get().auto_scope);
1182
1183 combobox(3, "Hitchance Type", hcty, &c_config::get().hcty);
1184
1185 slider(150, "Zeus Range", &c_config::get().zeus_range, "M", 1);
1186
1187 checkbox("Automatic Fire", &c_config::get().auto_scope2);
1188
1189 checkbox("Automatic Penetration", &c_config::get().auto_scope3);
1190
1191 checkbox("Automatic Revolver", &c_config::get().autorevolver);
1192
1193 checkbox("Silent Aim", &c_config::get().hide_shot);
1194
1195 checkbox("Override awp", &c_config::get().overrideawp);
1196 combobox(6, "Weapons ", AutoStopOptions2, &c_config::get().mode);
1197 std::string HitScam[8] = { "Head", "Pelvis", "Thorax", "L.Chest", "U.Chest", "Foot", "Arm", "Thigm" };
1198 if (c_config::get().mode == 0)
1199 {
1200 slider(100, "Minimum Hitchance", &c_config::get().auto_hitchance, "%", 1);
1201 slider(100, "Minimum Damage", &c_config::get().auto_mindamage, "HP", 1);
1202 MultiComboBox(8, "Hitscan", HitScam, c_config::get().rage_hitscan_hitboxes);
1203 slider(100, "Head Scale (Auto)", &c_config::get().auto_headscale, "%", 1);
1204 slider(100, "Body Scale (Auto)", &c_config::get().auto_bodyscale, "%", 1);
1205 }
1206 if (c_config::get().mode == 1)
1207 {
1208 slider(100, "Minimum Hitchance", &c_config::get().scout_hitchance, "%", 1);
1209 slider(100, "Minimum Damage", &c_config::get().scout_mindamage, "HP", 1);
1210 MultiComboBox(8, "Hitscan", HitScam, c_config::get().rage_hitscan_hitboxes);
1211 slider(100, "Head Scale (Scout)", &c_config::get().scout_headscale, "%", 1);
1212 slider(100, "Body Scale (Scout)", &c_config::get().scout_bodyscale, "%", 1);
1213 }
1214 if (c_config::get().mode == 2)
1215 {
1216 slider(100, "Minimum Hitchance", &c_config::get().awp_hitchance, "%", 1);
1217 slider(100, "Minimum Damage", &c_config::get().awp_mindamage, "HP", 1);
1218 MultiComboBox(8, "Hitscan", HitScam, c_config::get().rage_hitscan_hitboxes);
1219 slider(100, "Head Scale (AWP)", &c_config::get().awp_headscale, "%", 1);
1220 slider(100, "Body Scale (AWP)", &c_config::get().awp_bodyscale, "%", 1);
1221 }
1222 if (c_config::get().mode == 3)
1223 {
1224 slider(100, "Minimum Hitchance", &c_config::get().heavy_pistol_hitchance, "%", 1);
1225 slider(100, "Minimum Damage", &c_config::get().heavy_pistol_mindamage, "HP", 1);
1226 MultiComboBox(8, "Hitscan", HitScam, c_config::get().rage_hitscan_hitboxes);
1227 slider(100, "Head Scale (H. Pistol)", &c_config::get().hpistol_headscale, "%", 1);
1228 slider(100, "Body Scale (H. Pistol)", &c_config::get().hpistol_bodyscale, "%", 1);
1229 }
1230 if (c_config::get().mode == 4)
1231 {
1232 slider(100, "Minimum Hitchance", &c_config::get().pistol_hitchance, "%", 1);
1233 slider(100, "Minimum Damage", &c_config::get().pistol_mindamage, "HP", 1);
1234 MultiComboBox(8, "Hitscan", HitScam, c_config::get().rage_hitscan_hitboxes);
1235 slider(100, "Head Scale (Pistol)", &c_config::get().pistol_headscale, "%", 1);
1236 slider(100, "Body Scale (Pistol)", &c_config::get().pistol_bodyscale, "%", 1);
1237 }
1238 if (c_config::get().mode == 5)
1239 {
1240 slider(100, "Minimum Hitchance", &c_config::get().other_hitchance, "%", 1);
1241 slider(100, "Minimum Damage", &c_config::get().other_mindamage, "HP", 1);
1242 MultiComboBox(8, "Hitscan", HitScam, c_config::get().rage_hitscan_hitboxes);
1243 slider(100, "Head Scale (Other)", &c_config::get().other_headscale, "%", 1);
1244 slider(100, "Body Scale (Other)", &c_config::get().other_bodyscale, "%", 1);
1245 }
1246 groupbox(390, 140, GroupBoxSize_Width, GroupBoxSize_Height + 363, "");
1247
1248 std::string bt[2] = { "Head", "Neck" };
1249 checkbox("Remove recoil", &c_config::get().aimbot_norecoil);
1250 checkbox("Fakelag prediction", &c_config::get().fakelag_prediction);
1251 checkbox("Resolver", &c_config::get().aimbot_resolver);
1252 checkbox("anti-freestand(warning fps)", &c_config::get().antifreestand);
1253 if (c_config::get().antifreestand)
1254 slider(100, "damage tolerance", &c_config::get().damage_tolerance, "hp", 1);
1255 //checkbox("Pitch Resolver", &c_config::get().pitchresolver);
1256 checkbox("Accuracy Boost", &c_config::get().back_boost);
1257 if (c_config::get().back_boost) {
1258 checkbox("Extended Backtracking", &c_config::get().extendedbacktrack);
1259 }
1260 MultiComboBox(2, "Backtrack Hitbox", bt, c_config::get().BacktrackHitbox);
1261 checkbox("Auto Stop", &c_config::get().autostop);
1262
1263 combobox(3, "Auto Stop Mode", AutoStopOptions, &c_config::get().autostop_mode);
1264
1265
1266
1267 if (c_config::get().autostop_mode == 2)
1268 {
1269 slider(100, "Custom Auto Stop Speed", &c_config::get().customautostop, "", 1);
1270 }
1271 MultiComboBox(5, "Body Aim If", BodyAimOptions, c_config::get().prefer_bodyaim);
1272 //combobox(2, "Body Aim Mode", BodyAimModeOptions, &c_config::get().bodyaim_mode);
1273 slider(20, "Body Aim after X Miss", &c_config::get().missed_shoots, "", 1);
1274 slider(120, "Body Aim if HP Lower Than", &c_config::get().hp, "HP", 1);
1275 EmptySpace("Body Aim Key");
1276 keybind(&c_config::get().baim_bind, "Force Body Aim Key");
1277 }
1278 else if (tab_selected == 4)
1279 {
1280 groupbox(40, 140, GroupBoxSize_Width, GroupBoxSize_Height + 363, "");
1281 EmptySpace("");
1282 checkbox("Bunnyhop", &c_config::get().misc_bhop);
1283 checkbox("Air Strafe", &c_config::get().misc_autostrafe);
1284 checkbox("Killsay", &c_config::get().killsay);
1285 checkbox("Clan tag", &c_config::get().clan);
1286 std::string clanlists[5] = { "None", "Slowness.cc", "Onetap.su", "Aimware.net", "Gamesense" };
1287 combobox(5, "Clantag type", clanlists, &c_config::get().clanlist);
1288 checkbox("Automatic Pistol", &c_config::get().autopistol);
1289 checkbox("Name Stealer", &c_config::get().namespam);
1290
1291 checkbox("Buybot", &c_config::get().otbuybot);
1292 std::string primary[17] = { "Disabled", "Ak47/ M4a4", "AWP", "Galil/ Famas", "G3SG1/ SCAR20", "Scout", "SG556/ AUG", "Mac10/ Mp9", "MP5/ MP7", "P90", "PP BIZON", "Ump", "M249", "Nova", "Negev", "Sawed Off/ Mag7", "XM1014" };
1293 std::string second[4] = { "Disabled", "Dual Elites", "Revolver / Deagle", "Tec 9" };
1294 std::string add[4] = { "Kevlar", "Kevlar + Helmet", "Zeus x27", "Defuse Kit" };
1295 std::string grenades[5] = { "Incendiary/ Molotov", "Decoy", "Flashbang", "High Explosive", "Smoke" };
1296 combobox(17, "Primary", primary, &c_config::get().buybotlist);
1297 combobox(4, "Secondary", second, &c_config::get().bbsecond);
1298 MultiComboBox(5, "Grenades", grenades, c_config::get().greds);
1299 MultiComboBox(4, "Additional", add, c_config::get().adds);
1300
1301 groupbox(365, 50, GroupBoxSize_Width, GroupBoxSize_Height + 363, "test");
1302 color_selector("accent color", &c_config::get().menu_color_r, &c_config::get().menu_color_g, &c_config::get().menu_color_b, &c_config::get().menu_color_a);
1303 EmptySpace("Accent color");
1304 color_selector("slider color", &c_config::get().menu1_color_r, &c_config::get().menu1_color_g, &c_config::get().menu1_color_b, &c_config::get().menu1_color_a);
1305 EmptySpace("Slider color");
1306 color_selector("slider2 color", &c_config::get().menu2_color_r, &c_config::get().menu2_color_g, &c_config::get().menu2_color_b, &c_config::get().menu2_color_a);
1307 EmptySpace("Slider color 2");
1308 checkbox("Anti-untrusted", &c_config::get().misc_antiuntrusted);
1309 // checkbox("Watermark", &c_config::get().watermark);
1310 std::string watermark[3] = { "Off", "V1(Not Finished)", "V2" };
1311 combobox(3, "Watermark", watermark, &c_config::get().watermark2);
1312 std::string KeyBindList[7] = { "Slow Walk", "Swap Manual", "Fake Duck", "Air Stuck", "Left", "Right", "Back" };
1313 static int CurrentKeybind = 0;
1314 combobox(7, "Keybind", KeyBindList, &CurrentKeybind);
1315
1316 static int gay23 = 0;
1317
1318 switch (CurrentKeybind)
1319 {
1320 case 0: keybind(&c_config::get().slowwalk_bind, "b");
1321 break;
1322 case 1: keybind(&c_config::get().manual_swap_bind, "c");
1323 break;
1324 case 2: keybind(&c_config::get().fakeduck_bind, "d");
1325 break;
1326 case 3: keybind(&c_config::get().airstuck_bind, "e");
1327 break;
1328 case 4: keybind(&c_config::get().l, "f");
1329 break;
1330 case 5: keybind(&c_config::get().r, "g");
1331 break;
1332 case 6: keybind(&c_config::get().b, "h");
1333 }
1334
1335
1336 combobox(14, "Configuration", config_slots, &save_slot);
1337 button(Save_Config, "Save");
1338 button(Load_Config, "Load");
1339 }
1340 else if (tab_selected == 5)
1341 {
1342
1343 std::string watermark[3] = { "Extra Animation Fixes", "Watermark New", "Watermark v3" };
1344 groupbox(35, 50, GroupBoxSize_Width, GroupBoxSize_Height2 + 170, "Main");
1345 checkbox("Lua Api Enable", &c_config::get().lua);
1346 MultiComboBox(3, "Lua Options", watermark, &c_config::get().luaoptions);
1347 groupbox(35, 335, GroupBoxSize_Width, GroupBoxSize_Height2 + 170, "Visuals");
1348 if (c_config::get().luaoptions == 1)
1349 {
1350 checkbox("Better Enemy Animation Fix", &c_config::get().enemyfix);
1351 }
1352 groupbox(365, 50, GroupBoxSize_Width, GroupBoxSize_Height + 70, "Aimbot/Resolver");
1353
1354 groupbox(365, 335, GroupBoxSize_Width, GroupBoxSize_Height + 70, "Antiaim");
1355
1356 }
1357}
1358
1359void Menu::DoPlayerList(int x, int y, int w, int h) {
1360 g_pSurface->FilledRect(_pos.x + x, _pos.y + y, w, h, Color(25, 26, 33, MenuAlpha_Main));
1361 g_pSurface->OutlinedRect(_pos.x + x, _pos.y + y, w, h, Color(40, 44, 53, MenuAlpha_Main));
1362
1363 g_pSurface->FilledRect(_pos.x + x + 1, _pos.y + y + 1, w - 2, 15, Color(31, 31, 38, MenuAlpha_Main));
1364 g_pSurface->Line(_pos.x + x + 1, _pos.y + y + 15, _pos.x + x + w - 2, _pos.y + y + 15, Color(40, 44, 53, MenuAlpha_Main));
1365
1366 g_pSurface->DrawT(_pos.x + x + (w / 2), _pos.y + y + 1, Color(143, 143, 143, MenuAlpha_Main), Globals::SmallText, true, "Players");
1367
1368 if (g_pEngine->IsInGame() && g_pEngine->IsConnected()) {
1369 for (int i = 0; i < g_pGlobalVars->maxClients; i++) {
1370 auto Entity = g_pEntityList->GetClientEntity(i);
1371
1372 if (!Globals::LocalPlayer || !Entity)
1373 continue;
1374
1375 if (Entity->GetTeam() == Globals::LocalPlayer->GetTeam())
1376 continue;
1377
1378 PlayerInfo_s EntityInfo;
1379
1380 if (g_pEngine->GetPlayerInfo(i, &EntityInfo)) {
1381 auto SteamID = EntityInfo.iSteamID;
1382
1383 PlayerList_Player[i] = SteamID;
1384 static int selected_player;
1385
1386 RECT Area = { _pos.x + x, _pos.y + y + 17 + (16 * i), w, 15 };
1387
1388 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(Area.left, Area.top, Area.right, Area.bottom) && menuOpened) {
1389 selected_player = SteamID;
1390 }
1391
1392 if (selected_player == SteamID) {
1393 g_pSurface->FilledRect(Area.left, Area.top, Area.right, Area.bottom, Color(28, 28, 35, MenuAlpha_Main));
1394 }
1395 else {
1396 g_pSurface->FilledRect(Area.left, Area.top, Area.right, Area.bottom, Color(21, 21, 28, MenuAlpha_Main));
1397 }
1398
1399 g_pSurface->OutlinedRect(Area.left, Area.top, Area.right, Area.bottom, Color(40, 44, 53, MenuAlpha_Main));
1400
1401 g_pSurface->DrawT(Area.left + (Area.right / 2), Area.top + 1, Color(143, 143, 143, MenuAlpha_Main), Globals::SmallText, true, EntityInfo.szName);
1402
1403 }
1404
1405 }
1406 }
1407
1408}
1409void Menu::groupbox(int x, int y, int w, int h, std::string name, bool dont_draw, bool has_subtabs)
1410{
1411 if (!dont_draw)
1412 {
1413 RECT text_size = g_pSurface->GetTextSizeRect(Globals::SmallText, name.c_str());
1414 // g_pSurface->OutlinedRect(_pos.x + x - 1, _pos.y + y - 1, w + 2, h + 2, Color(0, 0, 0, 185));
1415 g_pSurface->FilledRect(_pos.x + x, _pos.y + y, w, h, Color(27, 23, 68, MenuAlpha_Main));
1416 g_pSurface->OutlinedRect(_pos.x + x, _pos.y + y, w, h, Color(0, 0, 0));
1417 g_pSurface->DrawT(_pos.x + x + 20, _pos.y + y - (text_size.bottom / 2), Color(181, 181, 181, MenuAlpha_Main), Globals::SmallText, false, name.c_str());
1418 // g_pSurface->DrawT(_pos.x + x + 15, _pos.y + y - (text_size.bottom / 2), Color(181, 181, 181, MenuAlpha_Main), g::GroupboxFont, false, name.c_str());
1419 auto a = _pos;
1420 }
1421
1422
1423 int ItemsToDraw = h / 24;
1424 Vector2D a = g_pSurface->GetMousePosition();
1425 // x left 2 right (im braindead)
1426
1427 groupbox_top = _pos.y + y;
1428
1429 if (has_subtabs)
1430 {
1431 y_offset = (_pos.y + (y + 34));
1432 }
1433 else
1434 {
1435 y_offset = (_pos.y + (y + 12));
1436 }
1437
1438
1439 x_offset = _pos.x + x;
1440 groupbox_bottom = (_pos.y + (y + h));
1441 groupbox_width = (_pos.x + (x + w));
1442}
1443
1444void Menu::ScrollableGroupBox(int x, int y, int w, int h)
1445{
1446 static bool pressed = false;
1447 static int add;
1448 if (GetAsyncKeyState(VK_DOWN) & 1)
1449 {
1450 add += 16;
1451 }
1452
1453 if (GetAsyncKeyState(VK_UP) & 1)
1454 {
1455 add -= 16;
1456 }
1457
1458
1459 y_offset = y_offset + add;
1460}
1461
1462void Watermark() {
1463 int w_s, h_s;
1464 int x, y, w, h;
1465 int w0, h0;
1466 g_pEngine->GetScreenSize(w_s, h_s);
1467
1468 w = w_s / 2; h = h_s / 2;
1469
1470 x = 5 + 5, y = 10, w = 197, h = 20;
1471
1472 auto watermark = [](int x, int y, int w, int h, Color c) {
1473 g_pSurface->Line(x, y, x, y + h, c);
1474 g_pSurface->Line(x, y + h, x + w + 1, y + h, c);
1475 g_pSurface->Line(x + w, y, x + w, y + h, c);
1476 g_pSurface->Line(x, y, x + w, y, c);
1477 };
1478
1479 static int u = 0;
1480 float watermarkScrollSpeed = 1.5f;
1481
1482 g_pSurface->FilledRect(x, y, w, h, Color(11, 11, 11));
1483 watermark(x - 0, y - 0, w + 0 * 2, h + 0 * 2, Color(18, 18, 18));
1484 watermark(x - 1, y - 1, w + 1 * 2, h + 1 * 2, Color(53, 53, 53));
1485 watermark(x - 2, y - 2, w + 2 * 2, h + 2 * 2, Color(28, 28, 28));
1486 watermark(x - 3, y - 3, w + 3 * 2, h + 3 * 2, Color(28, 28, 28));
1487 watermark(x - 4, y - 4, w + 4 * 2, h + 4 * 2, Color(28, 28, 28));
1488 watermark(x - 5, y - 5, w + 5 * 2, h + 5 * 2, Color(53, 53, 53));
1489 watermark(x - 6, y - 6, w + 6 * 2, h + 6 * 2, Color(18, 18, 18));
1490
1491 g_pSurface->DrawT(7 + 5, 14, Color(255, 255, 255, 255), Globals::SmallText, false, " money | by carterrr | ");
1492 g_pSurface->DrawT(153, 14, Color(255, 255, 255, 255), Globals::SmallText, false, "null");
1493 g_pSurface->DrawT(44 + 7, 14, Color(255, 255, 255, 255), Globals::SmallText, false, "sense");
1494}
1495
1496void Menu::checkbox(std::string name, bool* item)
1497{
1498 if (groupbox_bottom <= y_offset + 20)
1499 return;
1500
1501
1502 int size = 15;
1503
1504 static bool pressed = false;
1505
1506 RECT text_size = g_pSurface->GetTextSizeRect(Globals::SmallText, name.c_str());
1507
1508 if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 6, y_offset, size + 19 + text_size.right,
1509 size) && !dont_recieve_input && menuOpened)
1510 {
1511 if (pressed)
1512 *item = !*item;
1513 pressed = false;
1514 }
1515
1516 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 6, y_offset, size + 19 + text_size.right,
1517 size) && !pressed)
1518 pressed = true;
1519
1520
1521 if (*item == true)
1522 {
1523 g_pSurface->FilledRect(x_offset + 6, y_offset, size, size,
1524 Color(209, 42, 94, MenuAlpha_Main));
1525
1526 g_pSurface->DrawT(x_offset + 30, y_offset , Color(143, 143, 143, MenuAlpha_Main), Globals::SmallText, false,
1527 name.c_str());
1528 }
1529 else
1530 {
1531 g_pSurface->DrawT(x_offset + 30, y_offset , Color(143, 143, 143, MenuAlpha_Main), Globals::SmallText, false,
1532 name.c_str());
1533
1534 g_pSurface->FilledRect(x_offset + 6, y_offset, size, size, Color(27, 23, 68, MenuAlpha_Main));
1535 }
1536
1537
1538 g_pSurface->OutlinedRect(x_offset + 6, y_offset, size, size, Color(83, 80, 103, MenuAlpha_Main / 1.05));
1539
1540 // g_pSurface->DrawT(x_offset + 40, y_offset - 4, Color(0, 0, 0, MenuAlpha_Main), g::SmallText, false, name.c_str());
1541
1542
1543 y_offset += 20;
1544}
1545
1546void Menu::combobox(int size, std::string name, std::string* itemname, int* item)
1547{
1548 if (groupbox_bottom <= y_offset + 25)
1549 return;
1550
1551 bool pressed = false;
1552 bool open = false;
1553 static bool selected_opened = false;
1554 static bool click_rest;
1555 static bool rest;
1556 static std::string name_selected;
1557
1558 int ComboSize = 180; // 163
1559 static int offset = 0;
1560 if (name == "")
1561 {
1562 offset = -3;
1563 }
1564 else
1565 {
1566 offset = 14;
1567 }
1568
1569 if (menuOpened)
1570 {
1571 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 20, y_offset + offset, ComboSize, 20)
1572 && !click_rest && !dont_recieve_input)
1573 {
1574 name_selected = name;
1575 pressed = true;
1576 click_rest = true;
1577 }
1578 else if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(
1579 x_offset + 20, y_offset + offset, ComboSize, 20))
1580 click_rest = false;
1581
1582 if (pressed)
1583 {
1584 if (!rest)
1585 selected_opened = !selected_opened;
1586 rest = true;
1587 }
1588 else
1589 rest = false;
1590
1591 if (name_selected == name)
1592 open = selected_opened;
1593 }
1594
1595
1596 g_pSurface->DrawT(x_offset + 20, y_offset - 3, Color(143, 143, 143, MenuAlpha_Main), Globals::SmallText, false,
1597 name.c_str());
1598
1599 g_pSurface->FilledRect(x_offset + 20, y_offset + offset, ComboSize, 20, Color(27, 23, 68, MenuAlpha_Main));
1600
1601
1602 g_pSurface->OutlinedRect(x_offset + 20, y_offset + offset, ComboSize, 20, Color(83, 80, 103, MenuAlpha_Main));
1603 //
1604 if (open)
1605 {
1606 g_pSurface->FilledRect(x_offset + 20, y_offset + offset + 2 + 19, ComboSize, (size * 19),
1607 Color(27, 23, 68, MenuAlpha_Main));
1608 g_pSurface->OutlinedRect(x_offset + 20, y_offset + offset + 2 + 19, ComboSize, (size * 19),
1609 Color(83, 80, 103, MenuAlpha_Main));
1610
1611 for (int i = 0; i < size; i++)
1612 {
1613 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(
1614 x_offset + 20, y_offset + offset + 4 + 4 + 15 + i * 19, ComboSize, 19))
1615 {
1616 *item = i;
1617 }
1618
1619
1620 if (i == *item)
1621 g_pSurface->DrawT(x_offset + 20 + 5, y_offset + offset + 4 + 4 + 15 + i * 19,
1622 Color(143, 143, 143, MenuAlpha_Main), Globals::SmallText, false, itemname[i].c_str());
1623 else
1624 g_pSurface->DrawT(x_offset + 20 + 5, y_offset + offset + 4 + 4 + 15 + i * 19,
1625 Color(143, 143, 143, MenuAlpha_Main), Globals::SmallText, false, itemname[i].c_str());
1626 }
1627 }
1628
1629 // 143 143 143
1630 g_pSurface->DrawT(x_offset + 20 + 5, y_offset + offset + 3, Color(143, 143, 143, MenuAlpha_Main),
1631 Globals::SmallText, false, itemname[*item].c_str());
1632
1633 if (open) // i added 1 more to 42 bec the space between the main box and the drop down
1634 {
1635 if (name == "")
1636 {
1637 y_offset += 47 - 26 + (size * 19);
1638 }
1639 else
1640 {
1641 y_offset += 47 + (size * 19);
1642 }
1643 }
1644 else
1645 {
1646 if (name == "")
1647 {
1648 y_offset += 47 - 26;
1649 }
1650 else
1651 {
1652 y_offset += 41;
1653 }
1654 }
1655}
1656
1657
1658void Menu::slider(int max, std::string name, int* item, std::string suffix, int step)
1659{
1660 if (groupbox_bottom <= y_offset + 40)
1661 return;
1662
1663 float SliderSize = 193; // 163
1664
1665 float _pixel_value = max / SliderSize;
1666
1667 int sub = 0;
1668 //if (PreviousControl == slider) sub = 4; else sub = 0;
1669
1670 //float pixelValue = max / 96.f;
1671 float pixelValue = max / 134.f;
1672
1673
1674 // if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 7, y_offset + 15 - sub, 107, 10))
1675 // * item = (g_pSurface->GetMousePosition().x - (x_offset + 8)) * pixelValue;
1676
1677 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 7, y_offset + 15, 140, 10))
1678 * item = (g_pSurface->GetMousePosition().x - (x_offset + 8)) * pixelValue;
1679
1680 if (*item > max)
1681 * item = max;
1682
1683 if (*item < 0)
1684 * item = 0;
1685
1686 static bool pressed_subtract = false;
1687 static bool pressed_add = false;
1688
1689 //subtract
1690 if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 126, y_offset - 3, 9, 9)) {
1691 if (pressed_subtract)
1692 * item -= step;
1693 pressed_subtract = false;
1694 }
1695 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 126, y_offset - 3, 9, 9) && !pressed_subtract) pressed_subtract = true;
1696
1697 //addition
1698 if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 136, y_offset - 3, 9, 9)) {
1699 if (pressed_add)
1700 * item += step;
1701
1702 pressed_add = false;
1703 }
1704 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 136, y_offset - 3, 9, 9) && !pressed_add) pressed_add = true;
1705
1706
1707 g_pSurface->DrawT(x_offset + 126, y_offset - 3, Color(180, 180, 180), Globals::SmallText, false, "-");
1708
1709 g_pSurface->DrawT(x_offset + 136, y_offset - 3, Color(180, 180, 180), Globals::SmallText, false, "+");
1710
1711
1712
1713
1714 GradientV(x_offset + 14, y_offset + 15 - sub, 136, 15, Color(27, 23, 68, 255), Color(27, 23, 68, 255));
1715 // g_pSurface->FilledRect(x_offset + 14, y_offset + 15 - sub, (*item / pixelValue), 7, Color(220, 150, 0, 255));
1716 GradientH(x_offset + 14, y_offset + 15 - sub, (*item / pixelValue), 15, Color(c_config::get().menu2_color_r, c_config::get().menu2_color_g, c_config::get().menu2_color_b, 255), Color(c_config::get().menu1_color_r, c_config::get().menu1_color_g, c_config::get().menu1_color_b, 255));
1717 //g_pSurface->FilledRect(x_offset + 9 + (*item / pixelValue), y_offset + 15 - sub, 4, 8, Color(66, 66, 66, 250));
1718
1719 g_pSurface->OutlinedRect(x_offset + 14, y_offset + 15 - sub, 136, 15, Color(50, 46, 76));
1720
1721
1722
1723
1724 // g_pSurface->FilledRect(x_offset + 8 + (*item / pixelValue), y_offset + 13, 3, 11, Color(30, 30, 30, 255));
1725
1726
1727 std::string additives;
1728 std::string amount;
1729 amount += std::to_string(*item);
1730 additives += name;
1731 additives += " ";
1732 // additives += std::to_string(*item);
1733
1734 g_pSurface->DrawT(x_offset + 14, y_offset - 2, Color(180, 180, 180), Globals::SmallText, false, additives.c_str());
1735 g_pSurface->DrawT(x_offset + 15 + (*item / pixelValue), y_offset + 13, Color(185, 185, 185), Globals::SmallText, false, amount.c_str());
1736
1737
1738 // OldOffsetY = OffsetY;
1739 y_offset += 40;
1740 //PreviousControl = slider;
1741}
1742
1743void Menu::MultiComboBox(float indexes, std::string name, std::string* itemname, bool* item)
1744{
1745 static bool multiPressed = false;
1746 bool pressed = false;
1747 bool open = false;
1748 static bool selectedOpened = false;
1749 static bool clickRest;
1750 static bool rest;
1751 static std::string nameSelected;
1752 std::string itemsSelected = "";
1753 int lastItem = 0;
1754 int ComboSize = 180;
1755
1756 int offset = 0;
1757 if (name == "")
1758 {
1759 offset = 0;
1760 }
1761 else
1762 {
1763 offset = 14;
1764 }
1765
1766 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 20, y_offset + offset, ComboSize, 17) && !clickRest
1767 )
1768 {
1769 nameSelected = name;
1770 pressed = true;
1771 clickRest = true;
1772 }
1773 else if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 20, y_offset + offset, ComboSize, 20))
1774 clickRest = false;
1775
1776 if (pressed)
1777 {
1778 if (!rest)
1779 selectedOpened = !selectedOpened;
1780
1781 rest = true;
1782 }
1783 else
1784 rest = false;
1785
1786 if (nameSelected == name)
1787 open = selectedOpened;
1788
1789 g_pSurface->DrawT(x_offset + 20, y_offset - 3, Color(143, 143, 143, MenuAlpha_Main), Globals::SmallText, false,
1790 name.c_str());
1791
1792 g_pSurface->FilledRect(x_offset + 20, y_offset + offset - 2, ComboSize, 20, Color(27, 23, 68, MenuAlpha_Main));
1793 g_pSurface->OutlinedRect(x_offset + 20, y_offset + offset - 2, ComboSize, 20, Color(83, 80, 103, MenuAlpha_Main));
1794
1795 if (open)
1796 {
1797 g_pSurface->FilledRect(x_offset + 20, y_offset + offset + 2 + 19, ComboSize, (indexes * 19),
1798 Color(27, 23, 68, MenuAlpha_Main));
1799 g_pSurface->OutlinedRect(x_offset + 20, y_offset + offset + 2 + 19, ComboSize, (indexes * 19),
1800 Color(83, 80, 103, MenuAlpha_Main));
1801
1802 for (int i = 0; i < indexes; i++)
1803 {
1804 if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(
1805 x_offset + 20, y_offset + offset + 4 + 4 + 15 + i * 19, ComboSize, 20))
1806 {
1807 if (multiPressed)
1808 item[i] = !item[i];
1809 multiPressed = false;
1810 }
1811
1812 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(
1813 x_offset + 20, y_offset + offset + 16 + (i * 19), ComboSize, 20) && !multiPressed)
1814 multiPressed = true;
1815
1816 if (item[i])
1817 g_pSurface->DrawT(x_offset + 20 + 5, y_offset + offset + 4 + 4 + 15 + i * 19, Color(255, 255, 255, MenuAlpha_Main),
1818 Globals::SmallText, false, itemname[i].c_str());
1819 else
1820 g_pSurface->DrawT(x_offset + 20 + 5, y_offset + offset + 4 + 4 + 15 + i * 19, Color(185, 185, 185, MenuAlpha_Main),
1821 Globals::SmallText, false, itemname[i].c_str());
1822 }
1823 }
1824
1825 bool items = false;
1826
1827 for (int i = 0; i < indexes; i++)
1828 {
1829 if (item[i])
1830 {
1831 if (lastItem < i)
1832 lastItem = i;
1833 }
1834 }
1835
1836 for (int i = 0; i < indexes; i++)
1837 {
1838 if (item[i])
1839 {
1840 items = true;
1841 RECT TextSize = g_pSurface->GetTextSizeRect(Globals::SmallText, itemsSelected.c_str());
1842 RECT TextSizeGonaAdd = g_pSurface->GetTextSizeRect(Globals::SmallText, itemname[i].c_str());
1843 if (TextSize.right + TextSizeGonaAdd.right < ComboSize)
1844 itemsSelected += std::to_string(i) + ((lastItem == i) ? "" : ", ");
1845 }
1846 }
1847
1848 if (!items)
1849 itemsSelected = "Disabled";
1850
1851 g_pSurface->DrawT(x_offset + 20 + 5, y_offset + offset + 1, Color(143, 143, 143, MenuAlpha_Main), Globals::SmallText, false,
1852 itemsSelected.c_str());
1853
1854 if (open) // i added 1 more to 42 bec the space between the main box and the drop down
1855 y_offset += 52 + (indexes * 16);
1856 else
1857 y_offset += 41;
1858}
1859
1860char* KeyStringsStick[254] = {
1861 "INVLD", "M1", "M2", "BRK", "M3", "M4", "M5",
1862 "INVLD", "BSPC", "TAB", "INVLD", "INVLD", "INVLD", "ENTER", "INVLD", "INVLD", "SHI",
1863 "CTRL", "ALT", "PAU", "CAPS", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
1864 "ESC", "INVLD", "INVLD", "INVLD", "INVLD", "SPACE", "PGUP", "PGDOWN", "END", "HOME", "LEFT",
1865 "UP", "RIGHT", "DOWN", "INVLD", "PRNT", "INVLD", "PRTSCR", "INS", "DEL", "INVLD", "0", "1",
1866 "2", "3", "4", "5", "6", "7", "8", "9", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
1867 "INVLD", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U",
1868 "V", "W", "X", "Y", "Z", "LFTWIN", "RGHTWIN", "INVLD", "INVLD", "INVLD", "NUM0", "NUM1",
1869 "NUM2", "NUM3", "NUM4", "NUM5", "NUM6", "NUM7", "NUM8", "NUM9", "*", "+", "_", "-", ".", "/", "F1", "F2", "F3",
1870 "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16", "F17", "F18", "F19", "F20",
1871 "F21",
1872 "F22", "F23", "F24", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
1873 "NUM LOCK", "SCROLL LOCK", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
1874 "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "LSHFT", "RSHFT", "LCTRL",
1875 "RCTRL", "LMENU", "RMENU", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
1876 "INVLD", "INVLD", "INVLD", "NTRK", "PTRK", "STOP", "PLAY", "INVLD", "INVLD",
1877 "INVLD", "INVLD", "INVLD", "INVLD", ";", "+", ",", "-", ".", "/?", "~", "INVLD", "INVLD",
1878 "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
1879 "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
1880 "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "{", "\\|", "}", "'\"", "INVLD",
1881 "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
1882 "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
1883 "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
1884 "INVLD", "INVLD"
1885};
1886
1887bool keys[256];
1888bool oldKeys[256];
1889
1890bool GetKeyPress(unsigned int key)
1891{
1892 if (keys[key] == true && oldKeys[key] == false)
1893 return true;
1894 return false;
1895}
1896
1897void Menu::keybind(int* item, std::string name)
1898{
1899 if (groupbox_bottom <= y_offset + 41)
1900 return;
1901
1902 int ComboSize = 180; // 163
1903 static std::string nameSelected;
1904
1905
1906 static bool IsGettingKey = false;
1907 static int Key = 0;
1908 static bool GoodKeyName = false;
1909 Color text_color = Color(120, 120, 120, 255);
1910 std::copy(keys, keys + 255, oldKeys);
1911 for (int x = 0; x < 255; x++)
1912 {
1913 //oldKeys[x] = oldKeys[x] & keys[x];
1914 keys[x] = (GetAsyncKeyState(x));
1915 }
1916
1917 char NameBuffer[128];
1918 char* KeyName = "Unbinded";
1919 RECT text_size = g_pSurface->GetTextSizeRect(Globals::SmallText, KeyName);
1920 static bool LetsBindy0 = false;
1921 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 20, y_offset, 157, 20) && menuOpened)
1922 {
1923 if (!IsGettingKey)
1924 {
1925 IsGettingKey = true;
1926 }
1927 }
1928
1929 if (IsGettingKey)
1930 {
1931 for (int i = 0; i < 255; i++)
1932 {
1933 if (GetKeyPress(i))
1934 {
1935 if (i == VK_ESCAPE)
1936 {
1937 Key = -1;
1938 *item = Key;
1939 IsGettingKey = false;
1940 return;
1941 }
1942
1943 Key = i;
1944 *item = Key;
1945 IsGettingKey = false;
1946 return;
1947 }
1948 }
1949 }
1950
1951
1952 if (IsGettingKey)
1953 {
1954 KeyName = "~~~~~";
1955 text_color = Color(143, 143, 143, 255);
1956 }
1957 else
1958 {
1959 if (*item >= 0)
1960 {
1961 KeyName = KeyStringsStick[*item];
1962 if (KeyName)
1963 {
1964 GoodKeyName = true;
1965 }
1966 else
1967 {
1968 if (GetKeyNameText(*item << 16, NameBuffer, 127))
1969 {
1970 KeyName = NameBuffer;
1971 GoodKeyName = true;
1972 }
1973 }
1974 }
1975
1976 if (!GoodKeyName)
1977 {
1978 KeyName = "Unbinded";
1979 }
1980 }
1981
1982 if (manually_set_key)
1983 {
1984 Key = *item;
1985 manually_set_key = false;
1986 }
1987
1988
1989 g_pSurface->FilledRect(x_offset + 20, y_offset, ComboSize, 20, Color(27, 23, 68, MenuAlpha_Main));
1990 g_pSurface->OutlinedRect(x_offset + 20, y_offset, ComboSize, 20, Color(83, 80, 103, MenuAlpha_Main));
1991 g_pSurface->DrawT(x_offset + 20 + 5, y_offset + 3, Color(143, 143, 143, MenuAlpha_Main), Globals::SmallText, false,
1992 KeyName);
1993
1994 y_offset += 29;
1995}
1996
1997unsigned int rgb(double hue)
1998{
1999 int h = int(hue * 256 * 6);
2000 int x = h % 0x100;
2001
2002 int r = 0, g = 0, b = 0;
2003 switch (h / 256)
2004 {
2005 case 0: r = 255;
2006 g = x;
2007 break;
2008 case 1: g = 255;
2009 r = 255 - x;
2010 break;
2011 case 2: g = 255;
2012 b = x;
2013 break;
2014 case 3: b = 255;
2015 g = 255 - x;
2016 break;
2017 case 4: b = 255;
2018 r = x;
2019 break;
2020 case 5: r = 255;
2021 b = 255 - x;
2022 break;
2023 }
2024
2025 return r + (g << 8) + (b << 16);
2026}
2027
2028void color_spectrum(int x, int y)
2029{
2030 int Width = 168, Height = 179;
2031
2032 for (int i = 0; i < Width; i++)
2033 {
2034 int div = Width / 6;
2035 int phase = i / div;
2036 float t = (i % div) / (float)div;
2037 int r, g, b;
2038
2039 switch (phase)
2040 {
2041 case(0):
2042 r = 255;
2043 g = 255 * t;
2044 b = 0;
2045 break;
2046 case(1):
2047 r = 255 * (1.f - t);
2048 g = 255;
2049 b = 0;
2050 break;
2051 case(2):
2052 r = 0;
2053 g = 255;
2054 b = 255 * t;
2055 break;
2056 case(3):
2057 r = 0;
2058 g = 255 * (1.f - t);
2059 b = 255;
2060 break;
2061 case(4):
2062 r = 255 * t;
2063 g = 0;
2064 b = 255;
2065 break;
2066 case(5):
2067 r = 255;
2068 g = 0;
2069 b = 255 * (1.f - t);
2070 break;
2071 }
2072
2073 for (int k = 0; k < Height; k++)
2074 {
2075 float sat = k / (float)Height;
2076 int _r = r + sat * (128 - r);
2077 int _g = g + sat * (128 - g);
2078 int _b = b + sat * (128 - b);
2079 g_pSurface->DrawSetColor(_r, _g, _b, 255);
2080 g_pSurface->DrawFilledRect(10 + i, 10 + k, 1, 1);
2081 }
2082 }
2083}
2084
2085#include <conio.h>
2086#include <iostream>
2087#include <windows.h>
2088#include <stdlib.h>
2089
2090void Menu::EmptySpace(std::string name)
2091{
2092 if (groupbox_bottom <= y_offset + 10)
2093 return;
2094
2095 g_pSurface->DrawT(x_offset + 10, y_offset - 3, Color(143, 143, 143, MenuAlpha_Main), Globals::SmallText, false,
2096 name.c_str());
2097
2098 y_offset += 10;
2099}
2100
2101void Menu::color_selector(std::string name, int* red, int* green, int* blue, int* alpha)
2102{
2103 if (groupbox_bottom <= y_offset + 16)
2104 return;
2105
2106 bool pressed = false;
2107 bool open = false;
2108 static bool selected_opened = false;
2109 static bool click_rest;
2110 static bool rest;
2111 static std::string name_selected;
2112
2113 int ComboSize = 127; // 163
2114 int ComboSizeH = 127; // 163
2115 static int offset = 0;
2116 if (name == "sadasd")
2117 {
2118 offset = 0;
2119 }
2120 else
2121 {
2122 offset = 14;
2123 }
2124
2125 if (menuOpened)
2126 {
2127 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 225, y_offset + 1, 15, 8) && !
2128 click_rest)
2129 {
2130 name_selected = name;
2131 pressed = true;
2132 click_rest = true;
2133 }
2134 else if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 225, y_offset + 1, 15, 8))
2135 click_rest = false;
2136
2137 if (pressed)
2138 {
2139 if (!rest)
2140 selected_opened = !selected_opened;
2141 rest = true;
2142 }
2143 else
2144 rest = false;
2145
2146 if (name_selected == name)
2147 open = selected_opened;
2148 }
2149
2150
2151 static unsigned int r = 255;
2152 static unsigned int g = 0;
2153 static unsigned int b = 0;
2154
2155
2156 static unsigned int selected_r = 0;
2157 static unsigned int selected_g = 0;
2158 static unsigned int selected_b = 0;
2159
2160 static Vector2D MousePos;
2161 COLORREF color;
2162 COLORREF selected_color;
2163
2164 if (open)
2165 {
2166 dont_recieve_input = true;
2167 g_pSurface->FilledRect(x_offset + 225 - ComboSize - 5, y_offset, ComboSize, ComboSizeH,
2168 Color(21, 23, 27, MenuAlpha_Main));
2169
2170 g_pSurface->OutlinedRect(x_offset + 225 - ComboSize - 5, y_offset, ComboSize, ComboSizeH,
2171 Color(42, 46, 46, MenuAlpha_Main));
2172 g_pSurface->OutlinedRect(x_offset + 225 - ComboSize - 5 - 1, y_offset - 1, ComboSize + 2, ComboSizeH + 2,
2173 Color(34, 38, 37, MenuAlpha_Main));
2174
2175 float _pixel_value = 255 / (ComboSize - 5 - 17);
2176
2177 //if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 20 - 3, y_offset + 14, SliderSize + (3 * 2), 8)) {
2178 // *item = abs(g_pSurface->GetMousePosition().x - (x_offset + 20)) * _pixel_value;
2179 //}
2180
2181 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 225 - ComboSize - 5 + 5,
2182 y_offset + ComboSizeH - 11, (ComboSize - 5 - 17),
2183 7) && menuOpened)
2184 {
2185 *alpha = abs(g_pSurface->GetMousePosition().x - (x_offset + 225 - ComboSize - 5 + 5)) * _pixel_value;
2186 }
2187
2188
2189 if (*alpha < 3)
2190 {
2191 *alpha = 0;
2192 }
2193
2194 if (*alpha > 204)
2195 {
2196 *alpha = 255;
2197 }
2198
2199 g_pSurface->FilledRect(x_offset + 225 - ComboSize - 5 + 5, y_offset + ComboSizeH - 11, ComboSize - 5 - 17, 7,
2200 Color(255, 255, 255, *alpha));
2201 g_pSurface->OutlinedRect(x_offset + 225 - ComboSize - 5 + 5, y_offset + ComboSizeH - 11, ComboSize - 5 - 17, 7,
2202 Color(0, 0, 0, MenuAlpha_Main));
2203
2204
2205 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 233 - ComboSize + 101 + 1,
2206 y_offset + 5 + 1, 7 - 2, 107 - 1))
2207 {
2208 HDC hdc = GetDC(nullptr);
2209 color = GetPixel(hdc, g_pSurface->GetMousePosition().x, g_pSurface->GetMousePosition().y);
2210
2211 r = GetRValue(color);
2212 g = GetGValue(color);
2213 b = GetBValue(color);
2214 }
2215
2216
2217 GradientH(x_offset + 225 - ComboSize - 5 + 5, y_offset + 5, ComboSize - 5 - 17, ComboSizeH - 20,
2218 Color(255, 255, 255), Color(r, g, b));
2219 GradientVEnd(x_offset + 225 - ComboSize - 5 + 5, y_offset + 40, ComboSize - 5 - 17, ComboSizeH - 20,
2220 Color(0, 0, 0), Color(0, 0, 0));
2221
2222
2223 //g_pSurface->OutlinedRect(MousePos.x - 4, MousePos.y - 4, 8, 8, Color(0, 0, 0, MenuAlpha_Main));
2224 g_pSurface->OutlinedRect(x_offset + 225 - ComboSize - 5 + 5, y_offset + 5, ComboSize - 5 - 17, ComboSizeH - 20,
2225 Color(0, 0, 0, MenuAlpha_Main));
2226
2227 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 225 - ComboSize - 5 + 5 + 1,
2228 y_offset + 5 + 1, ComboSize - 5 - 17 - 2,
2229 ComboSizeH - 20 - 2))
2230 {
2231 HDC hdc = GetDC(nullptr);
2232 selected_color = GetPixel(hdc, g_pSurface->GetMousePosition().x, g_pSurface->GetMousePosition().y);
2233
2234 selected_r = GetRValue(selected_color);
2235 selected_g = GetGValue(selected_color);
2236 selected_b = GetBValue(selected_color);
2237
2238 *red = selected_r;
2239 *green = selected_g;
2240 *blue = selected_b;
2241
2242 MousePos = Vector2D(g_pSurface->GetMousePosition().x, g_pSurface->GetMousePosition().y);
2243 }
2244
2245 Color rainbow; int hue;
2246 for (int i = 0; i < 100; i++)
2247 {
2248 float hue = (i * .01f);
2249 rainbow.FromHSV(hue, 1.f, 1.f);
2250 g_pSurface->FilledRect(x_offset + 233 - ComboSize + 101, y_offset + 5 + i, 7, 8, rainbow);
2251 g_pSurface->OutlinedRect(x_offset + 233 - ComboSize + 101, y_offset + 5, 7, 107, Color(0, 0, 0, 255));
2252 }
2253 }
2254 else
2255 {
2256 dont_recieve_input = false;
2257 }
2258
2259
2260 if (*red > 20 && *green > 20 && *blue > 20)
2261 {
2262 g_pSurface->FilledRect(x_offset + 225, y_offset, 15, 7, Color(*red, *green, *blue, MenuAlpha_Main));
2263 }
2264 else
2265 {
2266 g_pSurface->FilledRect(x_offset + 225, y_offset, 15, 7, Color(*red, *green, *blue, MenuAlpha_Main));
2267 }
2268
2269 g_pSurface->OutlinedRect(x_offset + 225 - 1, y_offset - 1, 15 + 2, 7 + 2, Color(0, 0, 0, MenuAlpha_Main));
2270
2271 if (open)
2272 {
2273 y_offset += ComboSizeH;
2274 }
2275
2276 /*
2277 Color rainbow;
2278
2279 Color Test2;
2280
2281 static float test;
2282
2283 static DWORD color;
2284 static DWORD store_color;
2285 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 225 - 93, y_offset + 1, 108, 8)) {
2286
2287
2288 }
2289 else {
2290 unsigned int r = GetRValue(color);
2291 unsigned int g = GetGValue(color);
2292 unsigned int b = GetBValue(color);
2293
2294 *red = r;
2295 *green = g;
2296 *blue = b;
2297
2298 GradientV(x_offset + 225, y_offset, 16, 9, Color(*red, *green, *blue), Color(*red, *green, *blue));
2299 g_pSurface->OutlinedRect(x_offset + 225, y_offset, 16, 9, Color(0, 0, 0, MenuAlpha_Main));
2300 }
2301 */
2302}
2303
2304char* KeyDigits[254] = {
2305 nullptr, "Left Mouse", "Right Mouse", "Control+Break", "Middle Mouse", "Mouse 4", "Mouse 5",
2306 nullptr, "Backspace", "TAB", nullptr, nullptr, nullptr, "ENTER", nullptr, nullptr, "SHIFT", "CTRL", "ALT", "PAUSE",
2307 "CAPS LOCK", nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, "ESC", nullptr, nullptr, nullptr, nullptr,
2308 "SPACEBAR",
2309 "PG UP", "PG DOWN", "END", "HOME", "Left", "Up", "Right", "Down", nullptr, "Print", nullptr, "Print Screen",
2310 "Insert",
2311 "Delete", nullptr, "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", nullptr, nullptr, nullptr, nullptr, nullptr,
2312 nullptr,
2313 nullptr, "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U",
2314 "V", "W", "X",
2315 "Y", "Z", "Left Windows", "Right Windows", nullptr, nullptr, nullptr, "0", "1", "2", "3", "4", "5", "6",
2316 "7", "8", "9", "*", "+", "_", "-", ".", "/", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11",
2317 "F12",
2318 "F13", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "F21", "F22", "F23", "F24", nullptr, nullptr, nullptr,
2319 nullptr, nullptr,
2320 nullptr, nullptr, nullptr, "NUM LOCK", "SCROLL LOCK", nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
2321 nullptr, nullptr,
2322 nullptr, nullptr, nullptr, nullptr, nullptr, "LSHIFT", "RSHIFT", "LCONTROL", "RCONTROL", "LMENU", "RMENU", nullptr,
2323 nullptr, nullptr,
2324 nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, "Next Track", "Previous Track", "Stop", "Play/Pause",
2325 nullptr, nullptr,
2326 nullptr, nullptr, nullptr, nullptr, ";", "+", ",", "-", ".", "/?", "~", nullptr, nullptr, nullptr, nullptr,
2327 nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
2328 nullptr, nullptr,
2329 nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, "[{", "\\|", "}]", "'\"", nullptr, nullptr, nullptr,
2330 nullptr,
2331 nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
2332 nullptr, nullptr,
2333 nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr
2334};
2335
2336void Menu::TextBox(std::string name, std::string* text)
2337{
2338 if (groupbox_bottom <= y_offset + 16)
2339 return;
2340
2341 bool pressed = false;
2342 bool open = false;
2343 static bool selected_opened = false;
2344 static bool click_rest;
2345 static bool rest;
2346 static std::string name_selected;
2347
2348 int ComboSize = 127; // 163
2349 int ComboSizeH = 127; // 163
2350 static int offset = 0;
2351 if (name == "")
2352 {
2353 offset = 0;
2354 }
2355 else
2356 {
2357 offset = 14;
2358 }
2359
2360 std::copy(keys, keys + 255, oldKeys);
2361 for (int x = 0; x < 255; x++)
2362 {
2363 //oldKeys[x] = oldKeys[x] & keys[x];
2364 keys[x] = (GetAsyncKeyState(x));
2365 }
2366
2367
2368 if (menuOpened)
2369 {
2370 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 225, y_offset + 1, 15, 8) && !
2371 click_rest)
2372 {
2373 name_selected = name;
2374 pressed = true;
2375 click_rest = true;
2376 }
2377 else if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 225, y_offset + 1, 15, 8))
2378 click_rest = false;
2379
2380 if (pressed)
2381 {
2382 if (!rest)
2383 selected_opened = !selected_opened;
2384 rest = true;
2385 }
2386 else
2387 rest = false;
2388
2389 if (name_selected == name)
2390 open = selected_opened;
2391 }
2392
2393 const char* strg = text->c_str();
2394 if (open)
2395 {
2396 for (int i = 0; i < 255; i++)
2397 {
2398 if (GetKeyPress(i))
2399 {
2400 if (i == VK_ESCAPE || i == VK_RETURN || i == VK_INSERT)
2401 {
2402 open = false;
2403 return;
2404 }
2405
2406 if (i == VK_BACK && strlen(strg) != 0)
2407 {
2408 *text = text->substr(0, strlen(strg) - 1);
2409 }
2410
2411 if (strlen(strg) < 6 && (i == 0x30 || i == 0x31 || i == 0x32 || i == 0x33 || i == 0x34 || i == 0x35 || i
2412 == 0x36 || i == 0x37 || i == 0x38 || i == 0x39 || i == VK_NUMPAD0 || i == VK_NUMPAD1 || i ==
2413 VK_NUMPAD2 || i == VK_NUMPAD3 || i == VK_NUMPAD4 || i == VK_NUMPAD5 || i == VK_NUMPAD6 || i ==
2414 VK_NUMPAD7 || i == VK_NUMPAD8 || i == VK_NUMPAD9))
2415 {
2416 *text = *text + KeyDigits[i];
2417 return;
2418 }
2419 }
2420 }
2421 }
2422
2423 const char* cstr = text->c_str();
2424 g_pSurface->FilledRect(x_offset + 20, y_offset, ComboSize, 20, Color(32, 32, 32, MenuAlpha_Main));
2425 g_pSurface->OutlinedRect(x_offset + 20, y_offset, ComboSize, 20, Color(0, 0, 0, MenuAlpha_Main));
2426 g_pSurface->DrawT(x_offset + 20 + 5, y_offset + 3, Color(143, 143, 143, MenuAlpha_Main), Globals::SmallText, false,
2427 cstr);
2428
2429 y_offset += 29;
2430}
2431
2432void Menu::button(ButtonCallback_t callback, std::string title)
2433{
2434 if (groupbox_bottom <= y_offset + 18)
2435 return;
2436
2437 int ComboSize = 180;
2438
2439 static bool pressed = false;
2440
2441 RECT text_size = g_pSurface->GetTextSizeRect(Globals::SmallText, title.c_str());
2442
2443 if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 20, y_offset, ComboSize, 20) && menuOpened)
2444 {
2445 if (pressed)
2446 {
2447 if (callback)
2448 callback();
2449 }
2450 pressed = false;
2451 }
2452
2453 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 20, y_offset, ComboSize, 20) && !pressed)
2454 pressed = true;
2455
2456 if (g_pSurface->MouseInRegion(x_offset + 20, y_offset, ComboSize, 20) and GetAsyncKeyState(VK_LBUTTON))
2457 {
2458 g_pSurface->FilledRect(x_offset + 20, y_offset, ComboSize, 20, Color(35, 36, 43, MenuAlpha_Main));
2459 }
2460 else
2461 {
2462 g_pSurface->FilledRect(x_offset + 20, y_offset, ComboSize, 20, Color(32, 32, 32, MenuAlpha_Main));
2463 }
2464
2465 g_pSurface->OutlinedRect(x_offset + 20, y_offset, ComboSize, 20, Color(0, 0, 0, MenuAlpha_Main));
2466
2467 g_pSurface->DrawT(x_offset + 20 + (ComboSize / 2) - (text_size.right / 2),
2468 y_offset + (20 / 2) - (text_size.bottom / 2) - 1, Color(204, 204, 204, MenuAlpha_Main),
2469 Globals::SmallText, false, title.c_str());
2470 y_offset += 26;
2471}
2472
2473
2474void Menu::ListBox(int x, int y, int w, int h, int size, std::string name, std::string* itemname, int* item) {
2475 g_pSurface->FilledRect(_pos.x + x, _pos.y + y, w, h, Color(25, 26, 33, MenuAlpha_Main));
2476 g_pSurface->OutlinedRect(_pos.x + x, _pos.y + y, w, h, Color(40, 44, 53, MenuAlpha_Main));
2477
2478 g_pSurface->FilledRect(_pos.x + x + 1, _pos.y + y + 1, w - 2, 15, Color(31, 31, 38, MenuAlpha_Main));
2479 g_pSurface->Line(_pos.x + x + 1, _pos.y + y + 15, _pos.x + x + w - 2, _pos.y + y + 15, Color(40, 44, 53, MenuAlpha_Main));
2480
2481 g_pSurface->DrawT(_pos.x + x + (w / 2), _pos.y + y + 1, Color(143, 143, 143, MenuAlpha_Main), Globals::SmallText, true, name.c_str());
2482
2483 for (int i = 0; i < size; i++) {
2484 RECT Area = { _pos.x + x, _pos.y + y + 17 + (16 * i), w, 15 };
2485
2486 if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(Area.left, Area.top, Area.right, Area.bottom) && menuOpened) {
2487 *item = i;
2488 }
2489
2490 if (*item == i) {
2491 g_pSurface->FilledRect(Area.left, Area.top, Area.right, Area.bottom, Color(28, 28, 35, MenuAlpha_Main));
2492 }
2493 else {
2494 g_pSurface->FilledRect(Area.left, Area.top, Area.right, Area.bottom, Color(21, 21, 28, MenuAlpha_Main));
2495 }
2496
2497 g_pSurface->OutlinedRect(Area.left, Area.top, Area.right, Area.bottom, Color(40, 44, 53, MenuAlpha_Main));
2498
2499 g_pSurface->DrawT(Area.left + (Area.right / 2), Area.top + 1, Color(143, 143, 143, MenuAlpha_Main), Globals::SmallText, true, itemname[i].c_str());
2500 }
2501}