Advertisement
Guest User

Untitled

a guest
Jan 26th, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 73.16 KB | None | 0 0
  1. #include "Menu.h"
  2. #include "Config.h"
  3. #include "Hotkeys.h"
  4. #include "..\SDK\Vector.h"
  5. #include "..\SDK\ISurface.h"
  6. #include "..\Utils\Color.h"
  7. #include "..\Utils\GlobalVars.h"
  8. #include "..\Utils\XorStr.h"
  9. #include "..\Features\Misc\Misc.h"
  10. #include "..\Utils\Color.h"
  11. #include "..\Features\Features.h"
  12. #include "KeyVisualizer.h"
  13. #include "SpecList.h"
  14. #include "models.h"
  15. #include "x88/x88Menu.h"
  16.  
  17. Menu g_Menu;
  18. Hotkeys g_Hotkeys;
  19. KeyVisualizer g_KeyVisualizer;
  20.  
  21. // NEW MENU
  22. Color menu_background(33, 33, 33); //33, 33, 33
  23. Color menu_background2(51, 50, 51); //66, 66, 66
  24. Color menu_text(255, 255, 255); //255, 255, 255
  25.  
  26. Color menu_accent(132, 0, 195); //132, 0, 195
  27. Color button_light(239, 239, 239); //239, 239, 239
  28. Color button_idle_gray(191, 184, 191); //191, 184, 191
  29. Color button_dark(23, 23, 23); //23, 23, 23
  30.  
  31. Color EnemyColor(255, 255, 255); //255, 255, 255
  32. Color TeamColor(255, 255, 255); //255, 255, 255
  33. Color LocalColor(255, 255, 255); //255, 255, 255
  34. Color World2Color(50, 50, 50); //50, 50, 50
  35. Color Prop2Color(50, 50, 50); //50, 50, 50
  36. Color AmbientLight2Color(255, 255, 255); //255, 255, 255
  37. Color ArmsChams2Color(255, 255, 255); //255, 255, 255
  38. Color WeaponChams2Color(255, 255, 255); //255, 255, 255
  39.  
  40. int OldTickCount = 0;
  41. int GlobalOpacity = 0;
  42.  
  43. bool showMenu = true;
  44. bool shouldopenmenu = false;
  45. bool Debug = false;
  46.  
  47. int MenuWidth;
  48.  
  49. void save() { g_Config->Save(); }
  50. void reset() { g::shots == 0; g::hits == 0; }
  51. void load() { g_Config->Load(); }
  52. void unload() { g_Menu.Config.Unload = true; }
  53. void forceupdate() { g::knifeapply = true; }
  54. void InvisName()
  55. {
  56. g_Misc.SetName("\n\xAD\xAD\xAD");
  57. g_Misc.SetName("\n\xAD\xAD\xAD");
  58. g_Misc.SetName("\n\xAD\xAD\xAD");
  59. }
  60.  
  61. int AntiAimFlag = 0;
  62. int EspType = 0;
  63. int Chamstype = 0;
  64.  
  65. void Menu::Render()
  66. {
  67. static int iWidth, iHeight;
  68. g_pEngine->GetScreenSize(iWidth, iHeight);
  69.  
  70. menu_accent = Color(Config.MenuColor.red, Config.MenuColor.green, Config.MenuColor.blue);
  71. EnemyColor = Color(Config.EnemyGlowColor.red, Config.EnemyGlowColor.green, Config.EnemyGlowColor.blue);
  72. TeamColor = Color(Config.TeamGlowColor.red, Config.TeamGlowColor.green, Config.TeamGlowColor.blue);
  73. LocalColor = Color(Config.LocalGlowColor.red, Config.LocalGlowColor.green, Config.LocalGlowColor.blue);
  74. World2Color = Color(Config.WorldColor.red, Config.WorldColor.green, Config.WorldColor.blue);
  75. Prop2Color = Color(Config.PropColor.red, Config.PropColor.green, Config.PropColor.blue);
  76. AmbientLight2Color = Color(Config.AmbientLightColor.red, Config.AmbientLightColor.green, Config.AmbientLightColor.blue);
  77. ArmsChams2Color = Color(Config.ArmsChamsColor.red, Config.ArmsChamsColor.green, Config.ArmsChamsColor.blue);
  78. WeaponChams2Color = Color(Config.WeaponChamsColor.red, Config.WeaponChamsColor.green, Config.WeaponChamsColor.blue);
  79.  
  80. static bool Pressed = false;
  81.  
  82. if (!Pressed && GetAsyncKeyState(VK_INSERT))
  83. Pressed = true;
  84. else if (Pressed && !GetAsyncKeyState(VK_INSERT))
  85. {
  86. Pressed = false;
  87. shouldopenmenu = !shouldopenmenu;
  88. }
  89.  
  90. if (shouldopenmenu)
  91. {
  92. // opening
  93. if (GlobalOpacity < 255)
  94. {
  95. GlobalOpacity += 15;
  96. menuOpened = true;
  97. }
  98. }
  99. else
  100. {
  101. // closing
  102. if (GlobalOpacity > 0)
  103. GlobalOpacity -= 15;
  104. else
  105. menuOpened = false;
  106. }
  107.  
  108. static Vector2D oldPos;
  109. static Vector2D mousePos;
  110.  
  111. static int dragX = 0;
  112. static int dragY = 0;
  113. static int Width = MenuWidth = 600;
  114. static int Height = 500;
  115.  
  116. static int iScreenWidth, iScreenHeight;
  117.  
  118. static bool Dragging = false;
  119. bool click = false;
  120.  
  121. static bool changed_Debug = false;
  122. if (!changed_Debug && GetAsyncKeyState(VK_DELETE))
  123. changed_Debug = true;
  124. else if (changed_Debug && !GetAsyncKeyState(VK_DELETE))
  125. {
  126. changed_Debug = false;
  127. Debug = !Debug;
  128. }
  129.  
  130. if (Config.OnKeyAim)
  131. {
  132. if (GetAsyncKeyState(g_Hotkeys.GetHotkey(g_Menu.Config.AimHotkey)))
  133. Config.Aimbot = true;
  134. else
  135. Config.Aimbot = false;
  136. }
  137.  
  138. g_KeyVisualizer.Draw();
  139.  
  140. //Draw info shit for testing
  141. if (g::pLocalEntity && g_pEngine->IsConnected() && g_pEngine->IsInGame() && Config.TopInfoBar)
  142. {
  143. g_pSurface->FilledRect(0, 0, iWidth, 12, Color(33, 33, 33, 125));
  144. PlayerInfo_t pInfo;
  145. g_pEngine->GetPlayerInfo(g_pEngine->GetLocalPlayer(), &pInfo);
  146. std::string debug;
  147. debug += "Name: " + (std::string)pInfo.szName;
  148. debug += " | Health: " + std::to_string(g::pLocalEntity->GetHealth());
  149. debug += " | Armor: " + std::to_string(g::pLocalEntity->ArmorValue());
  150. if (g::pLocalEntity->GetActiveWeapon())
  151. debug += " | Weapon: " + g::pLocalEntity->GetActiveWeapon()->GetName();
  152. debug += " | Minimum Damage: " + std::to_string(Config.Mindmg);
  153. debug += " | Hitchance: " + std::to_string(Config.HitchanceValue);
  154. g_pSurface->DrawT(iWidth / 2, 0, Color(255, 255, 255), g::Tahoma, true, debug.c_str());
  155. }
  156.  
  157. if (Config.Watermark)
  158. {
  159. int fps = static_cast<int>(1.f / g_pGlobalVars->frametime);
  160. std::string nomezao;
  161. std::string tickzao22;
  162. nomezao += ("fps: ");
  163. tickzao22 += ("tick: ");
  164.  
  165. std::string timer;
  166. std::string bouncyfps;
  167. bouncyfps += std::to_string(fps);
  168. int tick = 1.0f / g_pGlobalVars->intervalPerTick;
  169. std::string tickzao = tickzao22;
  170. std::string infozao = nomezao;
  171. std::string bouncytick;
  172. bouncytick += std::to_string(tick);
  173. auto net_channel = g_pEngine->GetNetChannelInfo();
  174. auto local_player = reinterpret_cast<C_BaseEntity*>(g_pEntityList->GetClientEntity(g_pEngine->GetLocalPlayer()));
  175. std::string incoming = local_player ? std::to_string((int)(net_channel->GetLatency(FLOW_INCOMING) * 1000)) : "0";
  176. std::string outgoing = local_player ? std::to_string((int)(net_channel->GetLatency(FLOW_OUTGOING) * 1000)) : "0";
  177. static int x, y;
  178. g_pEngine->GetScreenSize(x, y);
  179.  
  180. int ResolutionForWatermarkToBeDisplayedProperlyX = 1920;
  181. int ResolutionForWatermarkToBeDisplayedProperlyY = 1080;
  182.  
  183. float MultiX = x / ResolutionForWatermarkToBeDisplayedProperlyX;
  184. float MultiY = y / ResolutionForWatermarkToBeDisplayedProperlyY;
  185.  
  186. /// RGB crap ///
  187. static float rainbow;
  188. rainbow += 0.001;
  189.  
  190. if (rainbow > 1.f)
  191. rainbow = 0.f;
  192. Color wmline = Color::FromHSB(rainbow, 1.f, 1.f);
  193.  
  194. g_pSurface->FilledRect((900 + 930) * MultiX, 20 * MultiY, 60, 60, Color(47, 49, 50, 200));
  195. g_pSurface->FilledRect((900 + 935) * MultiX, 25 * MultiY, 50, 50, Color(22, 22, 22));
  196. g_pSurface->FilledRect((900 + 940) * MultiX, 30 * MultiY, 40, 40, Color(12, 12, 12));
  197. g_pSurface->FilledRect((900 + 940) * MultiX, 30 * MultiY, 40, 5, Color(wmline));
  198.  
  199. g_pSurface->OutlinedRect(900 + 940, 30, 40, 5, Color(0, 0, 0, 200));
  200. g_pSurface->OutlinedRect(900 + 935, 25, 50, 50, Color(0, 0, 0, 200));
  201. g_pSurface->OutlinedRect(900 + 930, 20, 60, 60, Color(0, 0, 0));
  202. g_pSurface->DrawT(900 + 943, 35, Color(wmline), g::Watermark2, false, "M");
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209. g_pSurface->FilledRect(900 + 740, 20, 180, 60, Color(47, 49, 50, 200));
  210. g_pSurface->FilledRect(900 + 745, 25, 170, 50, Color(22, 22, 22));
  211. g_pSurface->FilledRect(900 + 750, 30, 160, 40, Color(12, 12, 12));
  212. g_pSurface->FilledRect(900 + 750, 30, 160, 5, Color(wmline));
  213.  
  214. g_pSurface->OutlinedRect(900 + 750, 30, 160, 5, Color(0, 0, 0, 200));
  215. g_pSurface->OutlinedRect(900 + 745, 25, 170, 50, Color(0, 0, 0, 200));
  216. g_pSurface->OutlinedRect(900 + 740, 20, 180, 60, Color(0, 0, 0, 200));
  217. g_pSurface->DrawT(900 + 755, 45, Color(255, 255, 255), g::Watermark1, false, "FPS:");
  218. g_pSurface->DrawT(900 + 785, 45, Color(wmline), g::Watermark1, infozao.c_str(), bouncyfps.c_str());
  219. g_pSurface->DrawT(900 + 810, 45, Color(255, 255, 255), g::Watermark1, false, "PING:");
  220. g_pSurface->DrawT(900 + 845, 45, Color(wmline), g::Watermark1, incoming.c_str(), outgoing.c_str());
  221. g_pSurface->DrawT(900 + 865, 45, Color(255, 255, 255), g::Watermark1, false, "TICK:");
  222. g_pSurface->DrawT(900 + 900, 45, Color(wmline), g::Watermark1, tickzao.c_str(), bouncytick.c_str());
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229. /*g_pSurface->FilledRect(900 + 610, 20, 120, 60, Color(47, 49, 50, 200));
  230. g_pSurface->FilledRect(900 + 615, 25, 110, 50, Color(22, 22, 22));
  231. g_pSurface->FilledRect(900 + 620, 30, 100, 40, Color(12, 12, 12));
  232. g_pSurface->FilledRect(900 + 620, 30, 100, 5, Color(2, 170, 192));
  233. g_pSurface->OutlinedRect(900 + 620, 30, 100, 5, Color(0, 0, 0, 200));
  234. g_pSurface->OutlinedRect(900 + 615, 25, 110, 50, Color(0, 0, 0, 200));
  235. g_pSurface->OutlinedRect(900 + 610, 20, 120, 60, Color(0, 0, 0, 200));*/
  236.  
  237. }
  238.  
  239. g_x88Menu.Draw();
  240.  
  241. if (g::pLocalEntity && g_pEngine->IsInGame())
  242. {
  243. if (Config.Aimbot && g::pLocalEntity->IsAlive())
  244. {
  245. C_BaseCombatWeapon *pWeapon = (C_BaseCombatWeapon*)g::pLocalEntity->GetActiveWeapon();
  246. if (pWeapon)
  247. {
  248. std::string WeaponName = pWeapon->GetName();
  249. if (WeaponName == "weapon_glock")
  250. g_Config->SetPistolConf();
  251. else if (WeaponName == "weapon_hkp2000")
  252. g_Config->SetPistolConf();
  253. else if (WeaponName == "weapon_p250")
  254. g_Config->SetPistolConf();
  255. else if (WeaponName == "weapon_tec9")
  256. g_Config->SetPistolConf();
  257. else if (WeaponName == "weapon_elite")
  258. g_Config->SetPistolConf();
  259. else if (WeaponName == "weapon_fiveseven")
  260. g_Config->SetPistolConf();
  261. else if (WeaponName == "weapon_deagle")
  262. g_Config->SetDeagleConf();
  263. else if (WeaponName == "weapon_nova")
  264. g_Config->SetScoutConf();
  265. else if (WeaponName == "weapon_sawedoff")
  266. g_Config->SetScoutConf();
  267. else if (WeaponName == "weapon_mag7")
  268. g_Config->SetScoutConf();
  269. else if (WeaponName == "weapon_xm1014")
  270. g_Config->SetScoutConf();
  271. else if (WeaponName == "weapon_mac10")
  272. g_Config->SetSmgConf();
  273. else if (WeaponName == "weapon_ump45")
  274. g_Config->SetSmgConf();
  275. else if (WeaponName == "weapon_mp9")
  276. g_Config->SetSmgConf();
  277. else if (WeaponName == "weapon_bizon")
  278. g_Config->SetSmgConf();
  279. else if (WeaponName == "weapon_mp7")
  280. g_Config->SetSmgConf();
  281. else if (WeaponName == "weapon_p90")
  282. g_Config->SetRifleConf();
  283. else if (WeaponName == "weapon_mp5sd")
  284. g_Config->SetSmgConf();
  285. else if (WeaponName == "weapon_galilar")
  286. g_Config->SetRifleConf();
  287. else if (WeaponName == "weapon_ak47")
  288. g_Config->SetRifleConf();
  289. else if (WeaponName == "weapon_sg556")
  290. g_Config->SetRifleConf();
  291. else if (WeaponName == "weapon_m4a1")
  292. g_Config->SetRifleConf();
  293. else if (WeaponName == "weapon_aug")
  294. g_Config->SetRifleConf();
  295. else if (WeaponName == "weapon_m249")
  296. g_Config->SetRifleConf();
  297. else if (WeaponName == "weapon_negev")
  298. g_Config->SetRifleConf();
  299. else if (WeaponName == "weapon_ssg08")
  300. g_Config->SetScoutConf();
  301. else if (WeaponName == "weapon_awp")
  302. g_Config->SetAwpConf();
  303. else if (WeaponName == "weapon_g3sg1")
  304. g_Config->SetAutoConf();
  305. else if (WeaponName == "weapon_scar20")
  306. g_Config->SetAutoConf();
  307. else
  308. g_Config->SetAutoConf();
  309. }
  310. }
  311.  
  312. if (Config.Crosshair)
  313. {
  314. Vector punchAngle = g::pLocalEntity->GetAimPunchAngle();
  315.  
  316. int x = iWidth / 2;
  317. int y = iHeight / 2;
  318. int dy = iHeight / 90;
  319. int dx = iWidth / 90;
  320. x -= (dx * (punchAngle.y));
  321. y += (dy * (punchAngle.x));
  322.  
  323. g_pSurface->DrawT(x + 1, y - 6, Color(255, 255, 255), g::Tahoma, true, "+");
  324. }
  325.  
  326.  
  327. if (Config.Antiaim && Config.DesyncAngle)
  328. {
  329. static bool changed_FakeSide = false;
  330. if (!changed_FakeSide && GetAsyncKeyState(g_Hotkeys.GetHotkey(g_Menu.Config.FakeSideHotkey)))
  331. changed_FakeSide = true;
  332. else if (changed_FakeSide && !GetAsyncKeyState(g_Hotkeys.GetHotkey(g_Menu.Config.FakeSideHotkey)))
  333. {
  334. changed_FakeSide = false;
  335. if (Config.FakeSide == 0)
  336. Config.FakeSide = 2;
  337. else
  338. Config.FakeSide = 0;
  339. }
  340. }
  341.  
  342. if (Config.Antiaim && (Config.YawMode == 2) && g::pLocalEntity->IsAlive())
  343. {
  344. static bool changed_AASide = false;
  345. if (!changed_AASide && GetAsyncKeyState(g_Hotkeys.GetHotkey(g_Menu.Config.AntiAimHotkey)))
  346. changed_AASide = true;
  347. else if (changed_AASide && !GetAsyncKeyState(g_Hotkeys.GetHotkey(g_Menu.Config.AntiAimHotkey)))
  348. {
  349. changed_AASide = false;
  350. if (Config.AntiAimSide == 0)
  351. Config.AntiAimSide = 2;
  352. else
  353. Config.AntiAimSide = 0;
  354. }
  355.  
  356. if (GetAsyncKeyState(VK_DOWN))
  357. {
  358. Config.Back = true;
  359. Config.Right = false;
  360. Config.Left = false;
  361. }
  362. if (GetAsyncKeyState(VK_LEFT))
  363. {
  364. Config.Back = false;
  365. Config.Right = false;
  366. Config.Left = true;
  367. }
  368. if (GetAsyncKeyState(VK_RIGHT))
  369. {
  370. Config.Back = false;
  371. Config.Right = true;
  372. Config.Left = false;
  373. }
  374.  
  375. if (g_Menu.Config.Back == true)
  376. {
  377. // g_pSurface->DrawT((iWidth / 2) - 30, (iHeight / 2) - 6, Color(255, 255, 255), g::arrowfont, true, "b");
  378. // g_pSurface->DrawT((iWidth / 2) + 30, (iHeight / 2) - 6, Color(255,255,255), g::arrowfont, true, "a");
  379. g_pSurface->DrawT(iWidth / 2, (iHeight / 2) + 20, menu_accent, g::arrowfont, true, "d");
  380. }
  381. if (g_Menu.Config.Right == true)
  382. {
  383. // g_pSurface->DrawT((iWidth / 2) - 30, (iHeight / 2) - 6, Color(255, 255, 255), g::arrowfont, true, "b");
  384. g_pSurface->DrawT((iWidth / 2) + 30, (iHeight / 2) - 6, menu_accent, g::arrowfont, true, "a");
  385. // g_pSurface->DrawT(iWidth / 2, (iHeight / 2) + 20, Color(255, 255, 255), g::arrowfont, true, "d");
  386. }
  387.  
  388. if (g_Menu.Config.Left == true)
  389. {
  390. g_pSurface->DrawT((iWidth / 2) - 30, (iHeight / 2) - 6, menu_accent, g::arrowfont, true, "b");
  391. // g_pSurface->DrawT((iWidth / 2) + 30, (iHeight / 2) - 6, Color(255, 255, 255), g::arrowfont, true, "a");
  392. // g_pSurface->DrawT(iWidth / 2, (iHeight / 2) + 20, Color(255, 255, 255), g::arrowfont, true, "d");
  393. }
  394. }
  395. if (Config.indicators)
  396. {
  397. if (g::pLocalEntity->IsAlive())
  398. {
  399. int screen_width, screen_height;
  400. g_pEngine->GetScreenSize(screen_width, screen_height);
  401. auto client_viewangles = Vector();
  402. g_pEngine->GetViewAngles(client_viewangles);
  403. constexpr auto radius = 120.f;
  404. const auto screen_center = Vector2D(screen_width / 2.f, screen_height / 2.f);
  405. auto draw_arrow = [&](float rot, Color color) -> void
  406. {
  407. Vector2D upperCorner, lowerCorner, farestCorner, midCornerUp, midCornerLow, mid;
  408. mid = Vector2D(screen_width / 2.f, screen_height / 2.f);
  409. farestCorner = (Vector2D(screen_center.x + cosf(rot) * radius, screen_center.y + sinf(rot) * radius));
  410. lowerCorner = (Vector2D(screen_center.x + cosf(rot + DEG2RAD(20)) * (80.f), screen_center.y + sinf(rot + DEG2RAD(12)) * (80.f))); //25
  411. upperCorner = (Vector2D(screen_center.x + cosf(rot - DEG2RAD(20)) * (80.f), screen_center.y + sinf(rot - DEG2RAD(12)) * (80.f))); //25
  412. midCornerLow = (Vector2D(screen_center.x + cosf(rot + DEG2RAD(9)) * (80.f), screen_center.y + sinf(rot + DEG2RAD(9)) * (80.f))); //25
  413. midCornerUp = (Vector2D(screen_center.x + cosf(rot - DEG2RAD(9)) * (80.f), screen_center.y + sinf(rot - DEG2RAD(9)) * (80.f))); //25
  414. /* Step 1 */ g_pSurface->Line(upperCorner.x, upperCorner.y, farestCorner.x, farestCorner.y, color); //from upper corner to top
  415. /* Step 2 */ g_pSurface->Line(farestCorner.x, farestCorner.y, lowerCorner.x, lowerCorner.y, color); //top to lower corne
  416. // /* Sep 3 */ g_pSurface->Line(lowerCorner.x, lowerCorner.y, midCornerLow.x, midCornerLow.y, color); //lower corner to mid lower corner
  417.  
  418. // /* Step 4 */ g_pSurface->Line(midCornerLow.x, midCornerLow.y, mid.x, mid.y, color); //mid lower corner to mid
  419. // /* Step 5 */ g_pSurface->Line(mid.x, mid.y, midCornerUp.x, midCornerUp.y, color); //mid to upper mid corner
  420.  
  421. // /* Step 6 */ g_pSurface->Line(midCornerUp.x, midCornerUp.y, upperCorner.x, upperCorner.y, color); //mid upper corner to upper corner
  422. };
  423. static const auto real_color = Color(102, 205, 0, 200);
  424. float real_rot = 0;
  425. real_rot = DEG2RAD(client_viewangles.y - g::RealAngle.y - 90);
  426. draw_arrow(real_rot, real_color);
  427. static const auto fake_color = Color(205, 0, 0, 200);
  428. const auto fake_rot = DEG2RAD(0, g::FakeAngle.y, 0);
  429. // draw_arrow(fake_rot, fake_color);
  430. }
  431. }
  432. if (Config.indicators)
  433. {
  434. if (g::pLocalEntity->IsAlive())
  435. {
  436. float desyncAmt = g_AntiAim.MaxDelta(g::pLocalEntity);
  437. float diffrence = (g::RealAngle.y - g::pLocalEntity->GetLowerBodyYaw());
  438. float Velocity = g::pLocalEntity->GetVelocity().Length2D();
  439. int offset = 40;
  440. Color fake = desyncAmt <= 29 ? Color(255, 0, 0) : (desyncAmt >= 55 ? Color(132, 195, 16) : Color(255 - (desyncAmt * 2.55), desyncAmt * 2.55, 0));
  441. std::string choke;
  442. auto NetChannel = g_pEngine->GetNetChannel();
  443.  
  444. if (!NetChannel)
  445. return;
  446.  
  447. choke += "choke: " + std::to_string(NetChannel->m_nChokedPackets);
  448. g_pSurface->DrawT(20, (iHeight - offset - 90), Color(255, 255, 255), g::Indicators, false, choke.c_str());
  449.  
  450.  
  451. if (diffrence > 35 && Velocity < 0.1f) // we could make multi combo box for this // no -t4zzuu
  452. g_pSurface->DrawT(20, (iHeight - offset - 60), Color(132, 195, 16), g::Indicators, false, "LBY");
  453. else
  454. g_pSurface->DrawT(20, (iHeight - offset - 60), Color(255, 0, 0), g::Indicators, false, "LBY");
  455.  
  456. if (!(desyncAmt < 29) && g_Menu.Config.DesyncAngle)
  457. g_pSurface->DrawT(20, (iHeight - offset - 30), fake, g::Indicators, false, "FAKE");
  458. }
  459. }
  460.  
  461. if (Config.shotcounter)
  462. {
  463. if (g::pLocalEntity->IsAlive())
  464. {
  465. std::string shotscounter;
  466. std::string shotscounter2;
  467. std::string shotscounter3;
  468. shotscounter += " shot: " + std::to_string(g::shots);
  469. shotscounter2 += " hit: " + std::to_string(g::hits);
  470. shotscounter3 += " miss: " + std::to_string(g::shots - g::hits);
  471. g_pSurface->DrawT(55, 400, Color(255, 255, 255), g::Indicators, true, shotscounter.c_str());
  472. g_pSurface->DrawT(55, 430, Color(255, 255, 255), g::Indicators, true, shotscounter2.c_str());
  473. g_pSurface->DrawT(55, 460, Color(255, 255, 255), g::Indicators, true, shotscounter3.c_str());
  474.  
  475. }
  476. }
  477.  
  478. if (Config.DrawAimFov) //draw fov
  479. {
  480. if (Config.Aimbot && Config.AimbotFov > 0)
  481. {
  482. Color FovColor(Config.AimFovColor.red, Config.AimFovColor.green, Config.AimFovColor.blue, 100);
  483. g_pSurface->OutlineCircle(iWidth / 2, iHeight / 2, Config.AimbotFov * 11, 100, FovColor);
  484. }
  485. else if (Config.LegitAimbot && Config.LegitAimFov > 0)
  486. {
  487. Color FovColor(Config.AimFovColor.red, Config.AimFovColor.green, Config.AimFovColor.blue, 100);
  488. g_pSurface->OutlineCircle(iWidth / 2, iHeight / 2, Config.LegitAimFov * 11, 100, FovColor);
  489. }
  490. }
  491. }
  492.  
  493. if (menuOpened)
  494. {
  495. menu_background.alpha = GlobalOpacity;
  496. menu_background2.alpha = GlobalOpacity;
  497. menu_text.alpha = GlobalOpacity;
  498. menu_accent.alpha = GlobalOpacity;
  499.  
  500. if (GetAsyncKeyState(VK_LBUTTON))
  501. click = true;
  502.  
  503. g_pEngine->GetScreenSize(iScreenWidth, iScreenHeight);
  504. Vector2D MousePos = g_pSurface->GetMousePosition();
  505.  
  506. if (Dragging && !click)
  507. Dragging = false;
  508.  
  509. if (Dragging && click)
  510. {
  511. Pos.x = MousePos.x - dragX;
  512. Pos.y = MousePos.y - dragY;
  513. }
  514.  
  515. if (g_pSurface->MouseInRegion(Pos.x, Pos.y, Width, 24))
  516. {
  517. Dragging = true;
  518. dragX = MousePos.x - Pos.x;
  519. dragY = MousePos.y - Pos.y;
  520. }
  521.  
  522. if (Pos.x < 0)
  523. Pos.x = 0;
  524. if (Pos.y < 0)
  525. Pos.y = 0;
  526. if ((Pos.x + Width) > iScreenWidth)
  527. Pos.x = iScreenWidth - Width;
  528. if ((Pos.y + Height) > iScreenHeight)
  529. Pos.y = iScreenHeight - Height;
  530.  
  531. // START MENU
  532. #pragma region Menu
  533.  
  534. // Main Background
  535. //g_pSurface->FilledRect(Pos.x, Pos.y, Width, Height, menu_background);
  536. //g_pSurface->OutlinedRect(Pos.x, Pos.y, Width, Height, menu_accent);
  537.  
  538. g_pSurface->FilledRect(Pos.x, Pos.y, 720, 500, Color(11, 10, 12));
  539. g_pSurface->FilledRect(Pos.x + 70, Pos.y + 80, 650, 420, Color(21, 19, 21, 255));
  540. g_pSurface->FilledRect(Pos.x, Pos.y, 720, 50, Color(21, 19, 21, 255));
  541. g_pSurface->OutlinedRect(Pos.x, Pos.y, 720, 500, Color(246, 1, 11, 125));
  542.  
  543. // Header
  544. g_pSurface->DrawT(Pos.x + 350, Pos.y + 5, menu_accent, g::Watermark, true, "EXPOSURE.XYZ"); // if you got some brain you know what is this
  545.  
  546. #pragma endregion
  547.  
  548.  
  549.  
  550. GroupTabPos[0] = Pos.x + 85;
  551. GroupTabPos[1] = Pos.y + 55;
  552. GroupTabPos[2] = Width - 32;
  553. GroupTabPos[3] = Height - 98;
  554.  
  555. OffsetY = GroupTabPos[1] + 25;
  556. ControlsX = GroupTabPos[0];
  557. ControlsX2 = ControlsX + ((Width / 2) - 30);
  558. GroupTabBottom = GroupTabPos[1] + GroupTabPos[3];
  559.  
  560. TabOffset = 0;
  561. SubTabOffset = 0;
  562. PreviousControl = -1;
  563. OldOffsetY = 10;
  564.  
  565. TabLegit("LEGIT");
  566. {
  567. CheckBox("Legit Aimbot", &Config.LegitAimbot);
  568. Slider(100, "Legit Aim Speed", &Config.AimSpeed);
  569. Slider(15, "Legit Aim Fov", &Config.LegitAimFov);
  570. KeyBind("Legit Aim Key", &Config.LegitAimKey);
  571. ComboBox("Legit Aim Hitbox", { "Head", "Chest", "Pelvis" }, &Config.LegitAimHitbox);
  572. CheckBox("Recoil Control System", &Config.RecoilControlSystem, "Not standalone");
  573. if (Config.RecoilControlSystem)
  574. {
  575. Slider(100, "RCS X", &Config.RCS_X);
  576. Slider(100, "RCS Y", &Config.RCS_Y);
  577. }
  578. CheckBox("Legit Backtracking", &Config.LegitBacktrack, "Uses closest recording tickcount to crosshair as tickcount to backtrack");
  579. }
  580. OffsetY = GroupTabPos[1] + 10;
  581. TabRage("AIMBOT");
  582. {
  583. SubTab("Main");
  584. {
  585. CheckBox("Enable", &Config.Aimbot);
  586. CheckBox("Silent Aim", &Config.SilentAim, "Turns on and off visual aimbot snapping");
  587. if (!Config.SilentAim)
  588. CheckBox("Show Recoil", &Config.AimShowRecoil);
  589. CheckBox("Auto Stop", &Config.Autostop);
  590. if (Config.Autostop)
  591. {
  592. ComboBox("Autostop Mode", { "Fullstop", "Minspeed" , "Custom" }, &Config.AutoStopMode);
  593. if (Config.AutoStopMode == 2)
  594. Slider(100, "Custom Autostop Speed", &Config.customstop);
  595. CheckBox("Stop In Between Shots", &Config.StopInBetweenShots);
  596. }
  597. CheckBox("Auto Scope", &Config.AutoScope);
  598. Slider(180, "Aim Field Of View", &Config.AimbotFov);
  599. CheckBox("Resolver", &Config.Resolver, "Tries to adjust enemys angles to fix desynced animations");
  600. CheckBox("Friendly Fire", &Config.FriendlyFire, "Makes aimbot target teammates");
  601. CheckBox("Position Adjustment", &Config.PosBacktrack);
  602. CheckBox("Backtrack Lower Body", &Config.LbyBacktrack, "Tries to backtrack the enemys lby, useful when enemy not resolvable");
  603. CheckBox("Fake Lag Prediction", &Config.FakeLagPrediction, "Tried to predict enemys fakelag");
  604. CheckBox("On Key Aim (mouse5)", &Config.OnKeyAim);
  605. ComboBox("Aim 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" }, &Config.AimHotkey);
  606. CheckBox("Automatic Revolver", &Config.AutoRevolver, "Automaticly Cogs Resolver");
  607. CheckBox("Automatic Weapons", &Config.AutomaticWeapons);
  608.  
  609. OffsetY = GroupTabPos[1] + 28;
  610. ControlsX = GroupTabPos[0] + (Width / 2);
  611. ControlsX2 = ControlsX + ((Width / 2) - 30);
  612.  
  613. ComboBox("Weapon", { "Auto", "Rifle" , "Scout" ,"Pistol", "Awp" , "Heavy" }, &Config.weaponmode);
  614. if (Config.weaponmode == 0)
  615. {
  616. Slider(100, "Auto Minimum Damage", &Config.AutoMD);
  617. Slider(100, "Auto Hitchance Damage", &Config.AutoHC);
  618. Slider(100, "Auto Head Scale", &Config.AutoHS);
  619. Slider(100, "Auto Body Scale", &Config.AutoBS);
  620. }
  621. if (Config.weaponmode == 1)
  622. {
  623. Slider(100, "Rifle Minimum Damage", &Config.RifleMD);
  624. Slider(100, "Rifle Hitchance Damage", &Config.RifleHC);
  625. Slider(100, "Rifle Head Scale", &Config.RifleHS);
  626. Slider(100, "Rifle Body Scale", &Config.RifleBS);
  627. }
  628. if (Config.weaponmode == 2)
  629. {
  630. Slider(100, "Scout Minimum Damage", &Config.ScoutMD);
  631. Slider(100, "Scout Hitchance Damage", &Config.ScoutHC);
  632. Slider(100, "Scout Head Scale", &Config.ScoutHS);
  633. Slider(100, "Scout Body Scale", &Config.ScoutBS);
  634. }
  635. if (Config.weaponmode == 3)
  636. {
  637. Slider(100, "Pistol Minimum Damage", &Config.PistolMD);
  638. Slider(100, "Pistol Hitchance Damage", &Config.PistolHC);
  639. Slider(100, "Pistol Head Scale", &Config.PistolHS);
  640. Slider(100, "Pistol Body Scale", &Config.PistolBS);
  641. }
  642. if (Config.weaponmode == 4)
  643. {
  644. Slider(150, "Awp Minimum Damage", &Config.AwpMD);
  645. Slider(100, "Awp Hitchance Damage", &Config.AwpHC);
  646. Slider(100, "Awp Head Scale", &Config.AwpHS);
  647. Slider(100, "Awp Body Scale", &Config.AwpBS);
  648. }
  649. if (Config.weaponmode == 5)
  650. {
  651. Slider(150, "Heavy Minimum Damage", &Config.DeagleMD);
  652. Slider(100, "Heavy Hitchance Damage", &Config.DeagleHC);
  653. Slider(100, "Heavy Head Scale", &Config.DeagleHS);
  654. Slider(100, "Heavy Body Scale", &Config.DeagleBS);
  655. }
  656.  
  657. CheckBox("Head Hitbox", &Config.HB_Head);
  658. CheckBox("Arms Hitbox", &Config.HB_Arms);
  659. CheckBox("Chest Hitbox", &Config.HB_Chest);
  660. CheckBox("Pelvis Hitbox", &Config.HB_Pelvis);
  661. CheckBox("Thighs Hitbox", &Config.HB_Thighs);
  662. CheckBox("Feet Hitbox", &Config.HB_Feet);
  663. }
  664.  
  665. OffsetY = GroupTabPos[1] + 10;
  666. ControlsX = GroupTabPos[0];
  667. ControlsX2 = ControlsX + ((Width / 2) - 30);
  668.  
  669. SubTab("advanced");
  670. {
  671. CheckBox("Baim Lethal", &Config.BaimLethal, "Makes aimbot target body parts when its lethal");
  672. CheckBox("Baim In Air", &Config.BaimInAir, "Makes aimbot target body parts when enemy is in air");
  673. Slider(20, "Baim After X Shots", &Config.BaimAfterXShots);
  674. Slider(20, "Baim After X Missed Shots", &Config.BaimAfterXMissedShots);
  675. }
  676. }
  677. OffsetY = GroupTabPos[1] + 30;
  678. TabAnti("ANTIAIM");
  679. {
  680. CheckBox("Enable", &Config.Antiaim);
  681. ComboBox("Anti Aim Flags", { "On Ground", "In Air" }, &AntiAimFlag);
  682. if (AntiAimFlag == 0)
  683. {
  684. ComboBox("Yaw", { "Backwards", "Jitter OT v2", "Manual", "Freestanding"}, &Config.YawMode);
  685.  
  686. if (Config.YawMode == 2)
  687. {
  688. ComboBox("Manual Mode", { "Mode1", "Mode2" }, &Config.ManualMode);
  689. if (Config.ManualMode == 1)
  690. {
  691. KeyBind("Anti Aim Right Key", &Config.RightHotkey);
  692. KeyBind("Anti Aim Left Key", &Config.LeftHotkey);
  693. KeyBind("Anti Aim Back Key", &Config.BackHotkey);
  694. }
  695. }
  696. Slider(360, "Jitter Range", &Config.JitterRange);
  697. ComboBox("Jitter Mode", { "Offset", "Random", "Slide" }, &Config.JitterMode);
  698.  
  699.  
  700. if (Config.JitterMode == 3)
  701. Slider(100, "Slide Speed", &Config.SlideSpeed);
  702.  
  703.  
  704. ComboBox("Pitch", { "Down", "Nazi Down", "Half Down", "Zero", "Up", "Jitter Up/Down", "Custom", "Nospread", "Nospread 2", "View" }, &Config.PitchMode);
  705.  
  706.  
  707. if (Config.PitchMode == 6)
  708. Slider(180, "Custom Pitch", &Config.CustomPitchValue);
  709.  
  710.  
  711. if (Config.YawMode == 0)
  712. {
  713. Slider(90, "Additive", &Config.BodyLean);
  714. Slider(90, "Additive Inverted", &Config.BodyLeanInverted);
  715. }
  716.  
  717.  
  718. CheckBox("Desync Angle", &Config.DesyncAngle);
  719. if (Config.DesyncAngle)
  720. {
  721. if (Config.YawMode != 9)
  722. ComboBox("Desync Mode", { "Normal"}, &Config.DesyncMode);
  723. 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" }, &Config.FakeSideHotkey);
  724. }
  725. }
  726.  
  727. OffsetY = GroupTabPos[1] + 30;
  728. ControlsX = GroupTabPos[0] + (Width / 2);
  729. ControlsX2 = ControlsX + ((Width / 2) - 30);
  730.  
  731. CheckBox("Lby Breaker", &Config.LbyBreaker, "Breaks Lower Body Yaw");
  732. if (Config.LbyBreaker)
  733. {
  734. Slider(360, "Lby Offset Add", &Config.LbyAdd);
  735. CheckBox("Lby Static", &Config.StaticLby);
  736. CheckBox("SendPacket On Break", &Config.SendPacketOnBreak, "Allows to send packets on lby flicks");
  737. }
  738. CheckBox("Zero Pitch On Land", &Config.ZeroPitchOnLand);
  739. CheckBox(Config.Antiaim ? "Slide Fix" : "Slide Walk", &Config.SlideWalk);
  740. CheckBox("Anti Aim Indicators", &Config.AntiAimIndicator, "Shows angle lines while in thirdperson");
  741. if (Config.AntiAimIndicator)
  742. CheckBox("Advanced AA Indicators", &Config.AdvancedAAIndicator);
  743. ComboBox("On Shot AA", { "Normal", "Fast" }, &Config.OnShotAA);
  744. CheckBox("Show Server Hitboxes", &Config.ShowServerHitboxes, "Shows your 'real' hitboxes networked by the server");
  745. }
  746.  
  747. OffsetY = GroupTabPos[1] + 10;
  748. ControlsX = GroupTabPos[0];
  749. ControlsX2 = ControlsX + ((Width / 2) - 30);
  750.  
  751. TabVIS("VISUALS");
  752. {
  753. SubTab("Esp");
  754. {
  755. ComboBox("Entitys", { "Player", "Bomb" }, &EspType); // For switching settings!
  756. switch (EspType)
  757. {
  758. case 0: // Player
  759. ComboBox("Enable", { "Off","On","Dead" }, &Config.Esp);
  760. CheckBox("2D Box", &Config.Box);
  761. ColorPicker("Esp Box Color", Config.BoxColor);
  762. CheckBox("Show Name", &Config.Name);
  763. ColorPicker("Name Color", Config.NameColor);
  764. CheckBox("Show Health", &Config.Health);
  765. ColorPicker("Health Color", Config.HealthColor);
  766. ColorPicker("Health Bar Color", Config.HealthBarColor);
  767.  
  768. CheckBox("Ammo Bar", &Config.ammo);
  769.  
  770. CheckBox("Show Weapon", &Config.Weapon);
  771. ColorPicker("Weapon Color", Config.WeaponColor);
  772.  
  773. CheckBox("Show Flags", &Config.YawPitch);
  774.  
  775. OffsetY = GroupTabPos[1] + 28;
  776. ControlsX = GroupTabPos[0] + (Width / 2);
  777. ControlsX2 = ControlsX + ((Width / 2) - 30);
  778.  
  779. CheckBox("Spectator List", &Config.SpecList);
  780. CheckBox("No Smoke", &Config.NoSmoke);
  781. CheckBox("No Flash", &Config.NoFlash);
  782. if (Config.NoFlash)
  783. Slider(255, "Flash Duration", &Config.FlashDuration);
  784. CheckBox("Preserve Kill Feed", &Config.PreserveKillFeed);
  785. CheckBox("Offscreen Esp", &Config.FovEnable);
  786. ColorPicker("Offscreen Color", Config.FovColor);
  787. if (Config.FovEnable)
  788. {
  789. Slider(255, "OffScreen Distance", &Config.FovSize);
  790. Slider(30, "OffScreen Size", &Config.FovDistance);
  791. }
  792. CheckBox("Visualize Player Hits", &Config.VizualizeHits);
  793. ColorPicker("Vizualize Hits Color", Config.CapsuleColor);
  794. CheckBox("Aspect Ratio Changer", &Config.aspectratio);
  795. if (Config.aspectratio)
  796. SliderFloat(10.f, "Aspect Ratio Value", &Config.aspectvalue);
  797. break;
  798. case 1: // Bomb
  799. CheckBox("Bomb Esp", &Config.BombEsp);
  800. break;
  801. default:
  802. break;
  803. }
  804. }
  805.  
  806. OffsetY = GroupTabPos[1] + 10;
  807. ControlsX = GroupTabPos[0];
  808. ControlsX2 = ControlsX + ((Width / 2) - 30);
  809.  
  810. SubTab("Glow");
  811. {
  812. CheckBox("Enemy Glow", &Config.EnemyGlow);
  813. if (Config.EnemyGlow)
  814. {
  815. Slider(255, "Enemy Glow Red", &EnemyColor.red);
  816. Slider(255, "Enemy Glow Green", &EnemyColor.green);
  817. Slider(255, "Enemy Glow Blue", &EnemyColor.blue);
  818. Config.EnemyGlowColor = { (float)EnemyColor.red, (float)EnemyColor.green, (float)EnemyColor.blue };
  819. Slider(255, "Enemy Glow Opacity", &Config.EnemyGlowOpacity);
  820. }
  821. CheckBox("Team Glow", &Config.TeamGlow);
  822. if (Config.TeamGlow)
  823. {
  824. Slider(255, "Team Glow Red", &TeamColor.red);
  825. Slider(255, "Team Glow Green", &TeamColor.green);
  826. Slider(255, "Team Glow Blue", &TeamColor.blue);
  827. Config.TeamGlowColor = { (float)TeamColor.red, (float)TeamColor.green, (float)TeamColor.blue };
  828. Slider(255, "Team Glow Opacity", &Config.TeamGlowOpacity);
  829. }
  830.  
  831. OffsetY = GroupTabPos[1] + 28;
  832. ControlsX = GroupTabPos[0] + (Width / 2);
  833. ControlsX2 = ControlsX + ((Width / 2) - 30);
  834.  
  835. CheckBox("Local Glow", &Config.LocalGlow);
  836. if (Config.LocalGlow)
  837. {
  838. ComboBox("Local Glow Mode", { "Basic", "Pulse", "Outline" }, &Config.LocalGlowMode);
  839. Slider(255, "Local Glow Red", &LocalColor.red);
  840. Slider(255, "Local Glow Green", &LocalColor.green);
  841. Slider(255, "Local Glow Blue", &LocalColor.blue);
  842. Config.LocalGlowColor = { (float)LocalColor.red, (float)LocalColor.green, (float)LocalColor.blue };
  843. Slider(255, "Local Glow Opacity", &Config.LocalGlowOpacity);
  844. }
  845. }
  846.  
  847. OffsetY = GroupTabPos[1] + 10;
  848. ControlsX = GroupTabPos[0];
  849. ControlsX2 = ControlsX + ((Width / 2) - 30);
  850.  
  851. SubTab("Rendering");
  852. {
  853. CheckBox("No Zoom", &Config.NoZoom);
  854. CheckBox("No Scope", &Config.NoScope);
  855. CheckBox("No Recoil", &Config.NoRecoil);
  856. Slider(150, "Fov", &Config.Fov);
  857. Slider(150, "Thirdperson Fov", &Config.ThirdpersonFov);
  858. Slider(250, "Viewmodel Fov", &Config.ViewmodelFov);
  859. CheckBox("Draw Aim Fov Circle", &Config.DrawAimFov);
  860. ColorPicker("Aim Fov Circle Color", Config.AimFovColor);
  861. CheckBox("Recoil Crosshair", &Config.Crosshair);
  862. if (Config.NoRecoil)
  863. Slider(2.f, "Aimpunch Amount", &Config.AimPunchVal);
  864. CheckBox("Disable Post Processing", &Config.DisablePostProcess);
  865.  
  866. OffsetY = GroupTabPos[1] + 28;
  867. ControlsX = GroupTabPos[0] + (Width / 2);
  868. ControlsX2 = ControlsX + ((Width / 2) - 30);
  869.  
  870. CheckBox("Night Mode", &Config.Nightmode);
  871. if (Config.Nightmode)
  872. {
  873. Slider(255, "World Red", &World2Color.red);
  874. Slider(255, "World Green", &World2Color.green);
  875. Slider(255, "World Blue", &World2Color.blue);
  876. Config.WorldColor = { (float)World2Color.red, (float)World2Color.green, (float)World2Color.blue };
  877. Slider(255, "Prop Red", &Prop2Color.red);
  878. Slider(255, "Prop Green", &Prop2Color.green);
  879. Slider(255, "Prop Blue", &Prop2Color.blue);
  880. Config.PropColor = { (float)Prop2Color.red, (float)Prop2Color.green, (float)Prop2Color.blue };
  881. }
  882. CheckBox("Proper Night Mode", &Config.ProperNightmode);
  883. if (Config.ProperNightmode || Config.Nightmode)
  884. Slider(255, "Object Blend", &Config.NightmodeBlend);
  885. }
  886.  
  887. OffsetY = GroupTabPos[1] + 10;
  888. ControlsX = GroupTabPos[0];
  889. ControlsX2 = ControlsX + ((Width / 2) - 30);
  890.  
  891. SubTab("Rendering 2");
  892. {
  893. CheckBox("Ambient Light Controller", &Config.AmbientLight);
  894. if (Config.AmbientLight)
  895. {
  896. Slider(255, "Ambient Light Red", &AmbientLight2Color.red);
  897. Slider(255, "Ambient Light Green", &AmbientLight2Color.green);
  898. Slider(255, "Ambient Light Blue", &AmbientLight2Color.blue);
  899. Config.AmbientLightColor = { (float)AmbientLight2Color.red, (float)AmbientLight2Color.green, (float)AmbientLight2Color.blue };
  900. }
  901.  
  902. CheckBox("Trace Bullets", &Config.BulletTracers);
  903. if (Config.BulletTracers)
  904. {
  905. CheckBox("Trace Bullets Ipacts", &Config.Impacts);
  906. ComboBox("Impact Type", { "Square", "Sphere" }, &Config.ImpactType);
  907. CheckBox("Trace Enemy Bullets", &Config.monkey2);
  908. ColorPicker("Bullet Tracer Enemy Color", Config.BulletTracerEnemyColor);
  909. CheckBox("Trace Local Player Bullets", &Config.monkey);
  910. ColorPicker("Bullet Tracer Local Color", Config.BulletTracerLocalColor);
  911. }
  912. CheckBox("Kill Counter", &Config.KillCounter);
  913. }
  914.  
  915. SubTab("Chams");
  916. {
  917. ComboBox("Chams Model", { "Players", "Viewmodel" }, &Chamstype);
  918. switch (Chamstype)
  919. {
  920. case 0:
  921. ComboBox("Chams Material", { "Metallic VertexLitGeneric", "Plastic VertexLitGeneric", "Unlit Generic", "Animated" }, &Config.ChamsMaterial);
  922.  
  923. CheckBox("Enemy Chams", &Config.EnemyChams);
  924. if (Config.EnemyChams)
  925. {
  926. ComboBox("Chams Material Enemy", { "Metallic VertexLitGeneric", "Plastic VertexLitGeneric", "Unlit Generic", "Animated" }, &Config.ChamsMaterialEnemy);
  927. ColorPicker("Enemy Chams Visible", Config.EnemyVisChamsColor);
  928.  
  929. CheckBox("Enemy XQZ Chams", &Config.EnemyXQZChams);
  930. ColorPicker("Enemy Chams XQZ", Config.EnemyXQZChamsColor);
  931. ComboBox("BT Chams", { "Off", "Purple->Cyan", "White->Black", "Chams->Transparent", "Last White" }, &Config.BacktrackingChams);
  932. }
  933.  
  934. CheckBox("Local Chams", &Config.LocalChams);
  935. //ComboBox("ModelChanger", { "FBI 1", "FBI 2", "FBI 3", "FBI 4", "SAS", "ST6 1", "ST6 2", "ST6 3", "ST6 4", "ST6 5","ST6 6", "Balkan 1", "Balkan 2", "Balkan 3", "Balkan 4", "Balkan 5", "Leet 1", "Leet 2", "Leet 3", "Leet 4", "Phoenix 1", "Phoenix 2", "Phoenix 3", "Heavy Phoenix", "Jumpsuit", }, &Config.Modelchanger); Exlodium
  936. if (Config.LocalChams)
  937. {
  938.  
  939. ColorPicker("Local Chams Visible", Config.LocalVisChamsColor);
  940. ComboBox("Chams Material Local", { "Metallic VertexLitGeneric", "Plastic VertexLitGeneric", "Unlit Generic", "Animated" }, &Config.ChamsMaterialLocal);
  941.  
  942. ColorPicker("Local Chams Second", Config.LocalXQZChamsColor);
  943. ComboBox("Chams Material Local Second", { "Metallic VertexLitGeneric", "Plastic VertexLitGeneric", "Unlit Generic", "Animated" }, &Config.ChamsMaterialLocal2);
  944.  
  945. }
  946.  
  947. if (Config.Antiaim && Config.DesyncAngle)
  948. {
  949. CheckBox("Desync Chams/Ghost Chams", &Config.DesyncChams);
  950. if (Config.DesyncChams)
  951. {
  952. ColorPicker("Desync Chams Color", Config.DesyncChamsColor);
  953. Slider(255, "Desync Chams Transparency", &Config.DesyncChamsTransparency);
  954. }
  955. }
  956. break;
  957. case 1:
  958. CheckBox("Viewmodel stuff", &Config.viewmodelchams);
  959. if (Config.viewmodelchams)
  960. {
  961. CheckBox("Hand Chams", &Config.ArmsChams);
  962. if (Config.ArmsChams)
  963. {
  964. ComboBox("Arms Chams Mode", { "Normal","Light" }, &Config.ArmsChamsMode);
  965. Slider(255, "Arms Chams Red", &ArmsChams2Color.red);
  966. Slider(255, "Arms Chams Green", &ArmsChams2Color.green);
  967. Slider(255, "Arms Chams Blue", &ArmsChams2Color.blue);
  968. Config.ArmsChamsColor = { (float)ArmsChams2Color.red, (float)ArmsChams2Color.green, (float)ArmsChams2Color.blue };
  969. Slider(255, "Arms Chams Transparency", &Config.ArmsChamsTransparency);
  970. CheckBox("Arms Chams WireFrame", &Config.ArmsWireFrame);
  971. }
  972.  
  973. CheckBox("Weapon Chams", &Config.WeaponChams);
  974. if (Config.WeaponChams)
  975. {
  976. Slider(255, "Weapon Chams Red", &WeaponChams2Color.red);
  977. Slider(255, "Weapon Chams Green", &WeaponChams2Color.green);
  978. Slider(255, "Weapon Chams Blue", &WeaponChams2Color.blue);
  979. Config.WeaponChamsColor = { (float)WeaponChams2Color.red, (float)WeaponChams2Color.green, (float)WeaponChams2Color.blue };
  980. }
  981. }
  982. break;
  983. default:
  984. break;
  985. }
  986. }
  987. }
  988.  
  989. OffsetY = GroupTabPos[1] + 10;
  990. ControlsX = GroupTabPos[0];
  991. ControlsX2 = ControlsX + ((Width / 2) - 30);
  992.  
  993. TabMisc("MISC");
  994. {
  995. SubTab("First");
  996. {
  997. ComboBox("Fake Lag Type", { "Off","Factor", "Adaptive", "Switch" }, &Config.FakeLagType);
  998. Slider(20, "Fake Lag Value On Ground", &Config.FakeLagValue);
  999. Slider(20, "Fake Lag Value In Air", &Config.FakeLagValueGround);
  1000. CheckBox("Show FakeLag", &Config.ShowLag);
  1001. ColorPicker("Show FakeLag Color", Config.ShowLagColor);
  1002. CheckBox("Slow Walk", &Config.SlowWalk);
  1003.  
  1004. OffsetY = GroupTabPos[1] + 28;
  1005. ControlsX = GroupTabPos[0] + (Width / 2);
  1006. ControlsX2 = ControlsX + ((Width / 2) - 30);
  1007.  
  1008. if (Config.SlowWalk)
  1009. {
  1010. ComboBox("Slow Walk Type", { "Hitchance Based", "Weapon Based", "Custom" }, &Config.SlowWalkType);
  1011. if (Config.SlowWalkType == 2)
  1012. Slider(100, "Custom Speed", &Config.SlowWalkAmount);
  1013. CheckBox("Stop Leg Animations", &Config.StopLegAnim);
  1014. }
  1015. CheckBox("Hitmarker", &Config.VisHitmarker);
  1016. if (Config.VisHitmarker)
  1017. CheckBox("Show Dmg", &Config.ShowDmg);
  1018. CheckBox("Log Damage", &Config.LogDamage);
  1019. CheckBox("Crouch Block", &Config.blockbotonhead);
  1020. if (Config.blockbotonhead)
  1021. KeyBind("^ Key", &Config.BlockBotKey);
  1022. CheckBox("Buy Bot", &Config.BuyBot.enable);
  1023. if (Config.BuyBot.enable)
  1024. {
  1025. ComboBox("Primary Weapon", { "None","Auto","Awp", "Scout" }, &Config.BuyBot.main);
  1026. ComboBox("Secondary Weapon", { "None","Heavy", "Dualies" }, &Config.BuyBot.second);
  1027. ComboBox("Armor", { "None", "Kevlar + Helmet" }, &Config.BuyBot.armor);
  1028. ComboBox("Grenades", { "None", "All" }, &Config.BuyBot.grenade);
  1029. }
  1030. Button("Hide Name", &InvisName);
  1031. }
  1032.  
  1033. OffsetY = GroupTabPos[1] + 10;
  1034. ControlsX = GroupTabPos[0];
  1035. ControlsX2 = ControlsX + ((Width / 2) - 30);
  1036.  
  1037. SubTab("Second");
  1038. {
  1039. ComboBox("Hitsound", { "None","Metallic", "Cod", "Rifk", "Bubble", "Bameware", "Yonen Moan", "Custom 1", "Custom 2", "Custom 3", "Custom 4", "Custom 5" }, &Config.Hitmarker);
  1040. KeyBind("Thirdperson Hotkey", &Config.ThirdpersonHotkey);
  1041. ComboBox("Clantag Spammer", { "Off", "Static", "Rotate", "Ev0lve", "Penguware", "Clapware.clap", "Do not click ;)" }, &Config.ClanTagMode);
  1042. CheckBox("Override Viewmodel", &Config.OverrideViewmodel);
  1043. if (Config.OverrideViewmodel)
  1044. {
  1045. Slider(60, "Viewmodel X", &Config.ViewmodelOffsetX);
  1046. Slider(60, "Viewmodel Y", &Config.ViewmodelOffsetY);
  1047. Slider(60, "Viewmodel Z", &Config.ViewmodelOffsetZ);
  1048. Slider(360, "Roll", &Config.roll);
  1049. }
  1050. CheckBox("Knife Left Side", &Config.KnifeLeftSide);
  1051. CheckBox("Key Visualization", &Config.KeyVisualizer);
  1052. CheckBox("Bunnyhop", &Config.Bhop);
  1053. CheckBox("Auto Strafe", &Config.AutoStrafe);
  1054. CheckBox("Quick Bomb Plant", &Config.quickerplant);
  1055. CheckBox("namestealer", &Config.namestealer);
  1056.  
  1057. OffsetY = GroupTabPos[1] + 28;
  1058. ControlsX = GroupTabPos[0] + (Width / 2);
  1059. ControlsX2 = ControlsX + ((Width / 2) - 30);
  1060.  
  1061. CheckBox("Edge Jump", &Config.EdgeJump);
  1062. KeyBind("Edge Jump Key", &Config.EdgeJumpKey);
  1063. CheckBox("Indicators", &Config.indicators);
  1064. CheckBox("Shot Counter", &Config.shotcounter);
  1065. CheckBox("Disable Panorama Blur", &Config.DisablePanoramaBlur);
  1066. CheckBox("Watermark", &Config.Watermark);
  1067. CheckBox("Anti Client Crasher", &Config.AntiClientCrasher, "Prevents users from eploiting the invite system to crash your CS:GO");
  1068. }
  1069. }
  1070.  
  1071. OffsetY = GroupTabPos[1] + 30;
  1072. ControlsX = GroupTabPos[0];
  1073. ControlsX2 = ControlsX + ((Width / 2) - 30);
  1074.  
  1075. TabLAST("CONFIG");
  1076. {
  1077. static bool overridemenucolor;
  1078. CheckBox("Override Accent", &overridemenucolor);
  1079. if (overridemenucolor)
  1080. {
  1081. Slider(255, "Accent Red", &menu_accent.red);
  1082. Slider(255, "Accent Green", &menu_accent.green);
  1083. Slider(255, "Accent Blue", &menu_accent.blue);
  1084. Config.MenuColor = { (float)menu_accent.red, (float)menu_accent.green, (float)menu_accent.blue };
  1085. }
  1086. CheckBox("Draw Top Info Bar", &Config.TopInfoBar);
  1087. /*CheckBox("x88 Menu Test", &Config.x88menu);*/
  1088.  
  1089. Space(10);
  1090.  
  1091. ComboBox("Config", { "Legit 1", "Legit 2", "Semi Rage", "HvH 1", "HvH 2" }, &Config.CurrentConfig);
  1092.  
  1093. Space(5);
  1094.  
  1095. Button("Save", &save);
  1096. Button("Load", &load);
  1097.  
  1098. Button("Reset Shot Counter", &reset);
  1099. OffsetY = GroupTabPos[1] + 28;
  1100. ControlsX = GroupTabPos[0] + (Width / 2);
  1101. ControlsX2 = ControlsX + ((Width / 2) - 30);
  1102.  
  1103.  
  1104. CheckBox("Knife Changer", &Config.knivchanger);
  1105. ComboBox("Knife Model", { "Bayonet","Flip Knife","Gut Knife","Karambit","M9 Bayonet","Huntsman Knife","Butterfly Knife","Falchion Knife","Shadow Daggers","Bowie Knife","Navaja Knife","Stiletto Knife","Ursus Knife","Talon Knife" }, &Config.Knife);
  1106. ComboBox("Knife Skin", { "Vanilla","Crimson Web","Bone Mask","Fade","Night","Blue Steel","Stained","Case Hardened","Slaughter","Safari Mesh","Boreal Forest","Ultraviolet","Urban Masked","Scorched","Rust Coat","Tiger Tooth","Damascus Steel","Damascus Steel","Marble Fade","Rust Coat","Doppler Ruby","Doppler Sapphire","Doppler Blackpearl","Doppler Phase 1","Doppler Phase 2","Doppler Phase 3","Doppler Phase 4","Gamma Doppler Phase 1","Gamma Doppler Phase 2","Gamma Doppler Phase 3","Gamma Doppler Phase 4","Gamma Doppler Emerald","Lore","Black Laminate","Autotronic","Freehand","Doppler_1new","Doppler_2new","Doppler_3new","Doppler_4new","Marble Fade_new","Damascus Steel_1new","Damascus Steel_2new" }, &Config.KnifeSkin);
  1107. ComboBox("Scar Skin", { "Vanilla","Crimson Web","Bone Mask","Fade","Night","Blue Steel","Stained","Case Hardened","Slaughter","Safari Mesh","Boreal Forest","Ultraviolet","Urban Masked","Scorched","Rust Coat","Tiger Tooth","Damascus Steel","Damascus Steel","Marble Fade","Rust Coat","Doppler Ruby","Doppler Sapphire","Doppler Blackpearl","Doppler Phase 1","Doppler Phase 2","Doppler Phase 3","Doppler Phase 4","Gamma Doppler Phase 1","Gamma Doppler Phase 2","Gamma Doppler Phase 3","Gamma Doppler Phase 4","Gamma Doppler Emerald","Lore","Black Laminate","Autotronic","Freehand","Doppler_1new","Doppler_2new","Doppler_3new","Doppler_4new","Marble Fade_new","Damascus Steel_1new","Damascus Steel_2new" }, &Config.Skinchanger.SCAR20Skin);
  1108. ComboBox("G3SG1 Skin", { "Vanilla","Crimson Web","Bone Mask","Fade","Night","Blue Steel","Stained","Case Hardened","Slaughter","Safari Mesh","Boreal Forest","Ultraviolet","Urban Masked","Scorched","Rust Coat","Tiger Tooth","Damascus Steel","Damascus Steel","Marble Fade","Rust Coat","Doppler Ruby","Doppler Sapphire","Doppler Blackpearl","Doppler Phase 1","Doppler Phase 2","Doppler Phase 3","Doppler Phase 4","Gamma Doppler Phase 1","Gamma Doppler Phase 2","Gamma Doppler Phase 3","Gamma Doppler Phase 4","Gamma Doppler Emerald","Lore","Black Laminate","Autotronic","Freehand","Doppler_1new","Doppler_2new","Doppler_3new","Doppler_4new","Marble Fade_new","Damascus Steel_1new","Damascus Steel_2new" }, &Config.Skinchanger.G3sg1Skin);
  1109. ComboBox("SSG08 Skin", { "Vanilla","Crimson Web","Bone Mask","Fade","Night","Blue Steel","Stained","Case Hardened","Slaughter","Safari Mesh","Boreal Forest","Ultraviolet","Urban Masked","Scorched","Rust Coat","Tiger Tooth","Damascus Steel","Damascus Steel","Marble Fade","Rust Coat","Doppler Ruby","Doppler Sapphire","Doppler Blackpearl","Doppler Phase 1","Doppler Phase 2","Doppler Phase 3","Doppler Phase 4","Gamma Doppler Phase 1","Gamma Doppler Phase 2","Gamma Doppler Phase 3","Gamma Doppler Phase 4","Gamma Doppler Emerald","Lore","Black Laminate","Autotronic","Freehand","Doppler_1new","Doppler_2new","Doppler_3new","Doppler_4new","Marble Fade_new","Damascus Steel_1new","Damascus Steel_2new" }, &Config.Skinchanger.SSG08Skin);
  1110. ComboBox("Dual Berretas Skin", { "Vanilla","Crimson Web","Bone Mask","Fade","Night","Blue Steel","Stained","Case Hardened","Slaughter","Safari Mesh","Boreal Forest","Ultraviolet","Urban Masked","Scorched","Rust Coat","Tiger Tooth","Damascus Steel","Damascus Steel","Marble Fade","Rust Coat","Doppler Ruby","Doppler Sapphire","Doppler Blackpearl","Doppler Phase 1","Doppler Phase 2","Doppler Phase 3","Doppler Phase 4","Gamma Doppler Phase 1","Gamma Doppler Phase 2","Gamma Doppler Phase 3","Gamma Doppler Phase 4","Gamma Doppler Emerald","Lore","Black Laminate","Autotronic","Freehand","Doppler_1new","Doppler_2new","Doppler_3new","Doppler_4new","Marble Fade_new","Damascus Steel_1new","Damascus Steel_2new" }, &Config.Skinchanger.DualSkin);
  1111. ComboBox("R8 Skin", { "Vanilla","Crimson Web","Bone Mask","Fade","Night","Blue Steel","Stained","Case Hardened","Slaughter","Safari Mesh","Boreal Forest","Ultraviolet","Urban Masked","Scorched","Rust Coat","Tiger Tooth","Damascus Steel","Damascus Steel","Marble Fade","Rust Coat","Doppler Ruby","Doppler Sapphire","Doppler Blackpearl","Doppler Phase 1","Doppler Phase 2","Doppler Phase 3","Doppler Phase 4","Gamma Doppler Phase 1","Gamma Doppler Phase 2","Gamma Doppler Phase 3","Gamma Doppler Phase 4","Gamma Doppler Emerald","Lore","Black Laminate","Autotronic","Freehand","Doppler_1new","Doppler_2new","Doppler_3new","Doppler_4new","Marble Fade_new","Damascus Steel_1new","Damascus Steel_2new" }, &Config.Skinchanger.RevolverSkin);
  1112. Button("Update", &forceupdate);
  1113. }
  1114.  
  1115. TabSize = TabOffset;
  1116. SubTabSize = SubTabOffset;
  1117. }
  1118. }
  1119.  
  1120. Color Shade(Color clr, float factor)
  1121. {
  1122. Color newcolor(255, 255, 255);
  1123. newcolor.red = clr.red * (1 - factor);
  1124. newcolor.green = clr.green * (1 - factor);
  1125. newcolor.blue = clr.blue * (1 - factor);
  1126.  
  1127. return newcolor;
  1128. }
  1129.  
  1130. void Menu::Tab(std::string name)
  1131. {
  1132. int height = 25;
  1133. int width = (MenuWidth - 2) / 6;
  1134. int TabArea[4] = { Pos.x + (TabOffset * width), Pos.y + 24, width, height };
  1135. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(TabArea[0] - 10, TabArea[1], TabArea[2], TabArea[3]))
  1136. TabNum = TabOffset;
  1137.  
  1138. if (TabOffset == TabNum)
  1139. {
  1140. g_pSurface->RoundedFilledRect(TabArea[0] - 10 + (TabArea[2] / 2) - 25, TabArea[1] + 24, 50, 20, 5, menu_accent);
  1141. g_pSurface->FilledRect(TabArea[0] - 10 + (TabArea[2] / 2) - 25, TabArea[1] + 29, 50, 5, menu_background);
  1142. g_pSurface->DrawT(TabArea[0] - 10 + (TabArea[2] / 2), TabArea[1] + 6, menu_text, g::EspTahoma, true, name.c_str());
  1143. }
  1144. else
  1145. {
  1146. g_pSurface->DrawT(TabArea[0] + (TabArea[2] / 2), TabArea[1] + 6, menu_text, g::EspTahoma, true, name.c_str());
  1147. }
  1148.  
  1149. TabOffset += 1;
  1150. PreviousControl = -1;
  1151. }
  1152. void Menu::TabLAST(std::string name)
  1153. {
  1154.  
  1155.  
  1156. int in_sizew = 150;
  1157.  
  1158. int height = 25;
  1159. int width = (MenuWidth - 2) / 20;
  1160. int TabArea[4] = { Pos.x - 15 , Pos.y + 460,99, 55 };
  1161. int TabAreaIcon[4] = { Pos.x - 15 , Pos.y + 430,99, 55 };
  1162. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(TabAreaIcon[0] - 10, TabAreaIcon[1], TabAreaIcon[2], TabAreaIcon[3]))
  1163. TabNum = TabOffset;
  1164.  
  1165. if (TabOffset == TabNum)
  1166. {
  1167. //g_pSurface->RoundedFilledRect(TabArea[0] - 10 + (TabArea[2] / 2) - 25, TabArea[1] + 24, 50, 20, 5, menu_accent);
  1168. //g_pSurface->FilledRect(TabArea[0] - 10 + (TabArea[2] / 2) - 25, TabArea[1] + 29, 50, 5, menu_background);
  1169. g_pSurface->DrawT(TabArea[0] + (TabArea[2] / 2), TabArea[1] + 6, menu_accent, g::NEWMENU, true, name.c_str());
  1170. g_pSurface->DrawT(TabAreaIcon[0] + (TabAreaIcon[2] / 2), TabAreaIcon[1] + 6, menu_accent, g::NEWMENUICON, true, "F");
  1171. }
  1172. else
  1173. {
  1174. g_pSurface->DrawT(TabArea[0] + (TabArea[2] / 2), TabArea[1] + 6, Color(54, 53, 55), g::NEWMENU, true, name.c_str());
  1175. g_pSurface->DrawT(TabAreaIcon[0] + (TabAreaIcon[2] / 2), TabAreaIcon[1] + 6, Color(54, 53, 55), g::NEWMENUICON, true, "F");
  1176. }
  1177.  
  1178. TabOffset += 1;
  1179. PreviousControl = -1;
  1180. }
  1181. void Menu::TabMisc(std::string name)
  1182. {
  1183.  
  1184.  
  1185. int in_sizew = 150;
  1186.  
  1187. int height = 25;
  1188. int width = (MenuWidth - 2) / 20;
  1189. int TabArea[4] = { Pos.x - 15 , Pos.y + 390,99, 55 };
  1190. int TabAreaIcon[4] = { Pos.x - 15 , Pos.y + 360,99, 55 };
  1191. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(TabAreaIcon[0] - 10, TabAreaIcon[1], TabAreaIcon[2], TabAreaIcon[3]))
  1192. TabNum = TabOffset;
  1193.  
  1194.  
  1195. if (TabOffset == TabNum)
  1196. {
  1197. //g_pSurface->RoundedFilledRect(TabArea[0] - 10 + (TabArea[2] / 2) - 25, TabArea[1] + 24, 50, 20, 5, menu_accent);
  1198. //g_pSurface->FilledRect(TabArea[0] - 10 + (TabArea[2] / 2) - 25, TabArea[1] + 29, 50, 5, menu_background);
  1199. g_pSurface->DrawT(TabArea[0] + (TabArea[2] / 2), TabArea[1] + 6, menu_accent, g::NEWMENU, true, name.c_str());
  1200. g_pSurface->DrawT(TabAreaIcon[0] + (TabAreaIcon[2] / 2), TabAreaIcon[1] + 6, menu_accent, g::NEWMENUICON, true, "F");
  1201. }
  1202. else
  1203. {
  1204. g_pSurface->DrawT(TabArea[0] + (TabArea[2] / 2), TabArea[1] + 6, Color(54, 53, 55), g::NEWMENU, true, name.c_str());
  1205. g_pSurface->DrawT(TabAreaIcon[0] + (TabAreaIcon[2] / 2), TabAreaIcon[1] + 6, Color(54, 53, 55), g::NEWMENUICON, true, "F");
  1206. }
  1207.  
  1208. TabOffset += 1;
  1209. PreviousControl = -1;
  1210. }
  1211. void Menu::TabVIS(std::string name)
  1212. {
  1213.  
  1214.  
  1215. int in_sizew = 150;
  1216.  
  1217. int height = 25;
  1218. int width = (MenuWidth - 2) / 20;
  1219. int TabArea[4] = { Pos.x - 15 , Pos.y + 320,99, 55 };
  1220. int TabAreaIcon[4] = { Pos.x - 15 , Pos.y + 290,99, 55 };
  1221. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(TabAreaIcon[0] - 10, TabAreaIcon[1], TabAreaIcon[2], TabAreaIcon[3]))
  1222. TabNum = TabOffset;
  1223.  
  1224.  
  1225. if (TabOffset == TabNum)
  1226. {
  1227. //g_pSurface->RoundedFilledRect(TabArea[0] - 10 + (TabArea[2] / 2) - 25, TabArea[1] + 24, 50, 20, 5, menu_accent);
  1228. //g_pSurface->FilledRect(TabArea[0] - 10 + (TabArea[2] / 2) - 25, TabArea[1] + 29, 50, 5, menu_background);
  1229. g_pSurface->DrawT(TabArea[0] + (TabArea[2] / 2), TabArea[1] + 6, menu_accent, g::NEWMENU, true, name.c_str());
  1230. g_pSurface->DrawT(TabAreaIcon[0] + (TabAreaIcon[2] / 2), TabAreaIcon[1] + 6, menu_accent, g::NEWMENUICON, true, "C");
  1231. }
  1232. else
  1233. {
  1234. g_pSurface->DrawT(TabArea[0] + (TabArea[2] / 2), TabArea[1] + 6, Color(54, 53, 55), g::NEWMENU, true, name.c_str());
  1235. g_pSurface->DrawT(TabAreaIcon[0] + (TabAreaIcon[2] / 2), TabAreaIcon[1] + 6, Color(54, 53, 55), g::NEWMENUICON, true, "C");
  1236. }
  1237.  
  1238. TabOffset += 1;
  1239. PreviousControl = -1;
  1240. }
  1241. void Menu::TabAnti(std::string name)
  1242. {
  1243.  
  1244.  
  1245. int in_sizew = 150;
  1246.  
  1247. int height = 25;
  1248. int width = (MenuWidth - 2) / 20;
  1249. int TabArea[4] = { Pos.x - 15 , Pos.y + 250,99, 55 };
  1250. int TabAreaIcon[4] = { Pos.x - 15 , Pos.y + 220,99, 55 };
  1251. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(TabAreaIcon[0] - 10, TabAreaIcon[1], TabAreaIcon[2], TabAreaIcon[3]))
  1252. TabNum = TabOffset;
  1253.  
  1254.  
  1255. if (TabOffset == TabNum)
  1256. {
  1257. //g_pSurface->RoundedFilledRect(TabArea[0] - 10 + (TabArea[2] / 2) - 25, TabArea[1] + 24, 50, 20, 5, menu_accent);
  1258. //g_pSurface->FilledRect(TabArea[0] - 10 + (TabArea[2] / 2) - 25, TabArea[1] + 29, 50, 5, menu_background);
  1259. g_pSurface->DrawT(TabArea[0] + (TabArea[2] / 2), TabArea[1] + 6, menu_accent, g::NEWMENU, true, name.c_str());
  1260. g_pSurface->DrawT(TabAreaIcon[0] + (TabAreaIcon[2] / 2), TabAreaIcon[1] + 6, menu_accent, g::NEWMENUICON, true, "G");
  1261. }
  1262. else
  1263. {
  1264. g_pSurface->DrawT(TabArea[0] + (TabArea[2] / 2), TabArea[1] + 6, Color(54, 53, 55), g::NEWMENU, true, name.c_str());
  1265. g_pSurface->DrawT(TabAreaIcon[0] + (TabAreaIcon[2] / 2), TabAreaIcon[1] + 6, Color(54, 53, 55), g::NEWMENUICON, true, "G");
  1266. }
  1267.  
  1268. TabOffset += 1;
  1269. PreviousControl = -1;
  1270. }
  1271. void Menu::TabRage(std::string name)
  1272. {
  1273.  
  1274.  
  1275. int in_sizew = 150;
  1276.  
  1277. int height = 25;
  1278. int width = (MenuWidth - 2) / 20;
  1279. int TabArea[4] = { Pos.x - 15 , Pos.y + 180,99, 55 };
  1280. int TabAreaIcon[4] = { Pos.x - 15 , Pos.y + 150,99, 55 };
  1281. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(TabAreaIcon[0] - 10, TabAreaIcon[1], TabAreaIcon[2], TabAreaIcon[3]))
  1282. TabNum = TabOffset;
  1283.  
  1284.  
  1285. if (TabOffset == TabNum)
  1286. {
  1287. //g_pSurface->RoundedFilledRect(TabArea[0] - 10 + (TabArea[2] / 2) - 25, TabArea[1] + 24, 50, 20, 5, menu_accent);
  1288. //g_pSurface->FilledRect(TabArea[0] - 10 + (TabArea[2] / 2) - 25, TabArea[1] + 29, 50, 5, menu_background);
  1289. g_pSurface->DrawT(TabArea[0] + (TabArea[2] / 2), TabArea[1] + 6, menu_accent, g::NEWMENU, true, name.c_str());
  1290. g_pSurface->DrawT(TabAreaIcon[0] + (TabAreaIcon[2] / 2), TabAreaIcon[1] + 6, menu_accent, g::NEWMENUICON, true, "A");
  1291. }
  1292. else
  1293. {
  1294. g_pSurface->DrawT(TabArea[0] + (TabArea[2] / 2), TabArea[1] + 6, Color(54, 53, 55), g::NEWMENU, true, name.c_str());
  1295. g_pSurface->DrawT(TabAreaIcon[0] + (TabAreaIcon[2] / 2), TabAreaIcon[1] + 6, Color(54, 53, 55), g::NEWMENUICON, true, "A");
  1296. }
  1297.  
  1298. TabOffset += 1;
  1299. PreviousControl = -1;
  1300. }
  1301. void Menu::TabLegit(std::string name)
  1302. {
  1303.  
  1304.  
  1305. int in_sizew = 150;
  1306.  
  1307. int height = 25;
  1308. int width = (MenuWidth - 2) / 20;
  1309. int TabArea[4] = { Pos.x - 15 , Pos.y + 120,99, 55 };
  1310. int TabAreaIcon[4] = { Pos.x - 15 , Pos.y + 80,99, 55 };
  1311. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(TabAreaIcon[0] - 10, TabAreaIcon[1], TabAreaIcon[2], TabAreaIcon[3]))
  1312. TabNum = TabOffset;
  1313. /// RGB crap ///
  1314. static float rainbow;
  1315. rainbow += 0.001;
  1316.  
  1317.  
  1318.  
  1319. if (TabOffset == TabNum)
  1320. {
  1321.  
  1322. //g_pSurface->RoundedFilledRect(TabArea[0] - 10 + (TabArea[2] / 2) - 25, TabArea[1] + 24, 50, 20, 5, menu_accent);
  1323. //g_pSurface->FilledRect(TabArea[0] - 10 + (TabArea[2] / 2) - 25, TabArea[1] + 29, 50, 5, menu_background);
  1324. g_pSurface->DrawT(TabArea[0] + (TabArea[2] / 2), TabArea[1] + 6, menu_accent, g::NEWMENU, true, name.c_str());
  1325. g_pSurface->DrawT(TabAreaIcon[0] + (TabAreaIcon[2] / 2), TabAreaIcon[1] + 6, menu_accent, g::NEWMENUICON, true, "B");
  1326. }
  1327. else
  1328. {
  1329. g_pSurface->DrawT(TabArea[0] + (TabArea[2] / 2), TabArea[1] + 6, Color(54, 53, 55), g::NEWMENU, true, name.c_str());
  1330. g_pSurface->DrawT(TabAreaIcon[0] + (TabAreaIcon[2] / 2), TabAreaIcon[1] + 6, Color(54, 53, 55), g::NEWMENUICON, true, "B");
  1331. }
  1332.  
  1333. TabOffset += 1;
  1334. PreviousControl = -1;
  1335. }
  1336. void Menu::SubTab(std::string name)
  1337. {
  1338. if (TabOffset - 1 != TabNum || TabOffset == 0)
  1339. return;
  1340.  
  1341. static int TabSkip = 0;
  1342.  
  1343. if (SubTabSize != 0 && TabSkip == TabNum)
  1344. {
  1345.  
  1346. int TabLength = (GroupTabPos[2] / SubTabSize);
  1347.  
  1348. int GroupTabArea[4] = { (GroupTabPos[0]) + (TabLength * SubTabOffset), GroupTabPos[1], TabLength, 20 };
  1349.  
  1350. if ((GroupTabArea[0] + GroupTabArea[3]) <= (GroupTabPos[0] + GroupTabPos[2]))
  1351. {
  1352. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(GroupTabArea[0], GroupTabArea[1], GroupTabArea[2], GroupTabArea[3]))
  1353. SubTabNum = SubTabOffset;
  1354.  
  1355. int Offset = ((SubTabSize - 1) == SubTabOffset) ? 0 : 1;
  1356.  
  1357. if (((SubTabSize - 1) == SubTabOffset) && (((TabLength * SubTabSize) > GroupTabPos[2]) || ((TabLength * SubTabSize) < GroupTabPos[2])))
  1358. Offset = (GroupTabPos[2] - (TabLength * SubTabSize));
  1359.  
  1360. if (SubTabNum == SubTabOffset)
  1361. {
  1362. //g_pSurface->FilledRect(GroupTabArea[0], GroupTabArea[1], GroupTabArea[2], GroupTabArea[3], menu_background2);
  1363. }
  1364.  
  1365. g_pSurface->DrawT(GroupTabArea[0] + (GroupTabArea[2] / 2), GroupTabArea[1] + 4, menu_text, g::EspTahoma, true, name.c_str());
  1366. }
  1367. }
  1368.  
  1369. if (TabSkip != TabNum) // frame skip for drawing
  1370. TabSkip = TabNum;
  1371.  
  1372. if (SubTabOffset == SubTabNum)
  1373. OffsetY += 20;
  1374.  
  1375. SubTabOffset += 1;
  1376. PreviousControl = -1;
  1377. }
  1378.  
  1379. void Menu::CheckBox(std::string name, bool* item, std::string tooltip)
  1380. {
  1381. if (GroupTabBottom <= OffsetY + 16)
  1382. return;
  1383.  
  1384. if (TabOffset - 1 != TabNum || TabOffset == 0)
  1385. return;
  1386.  
  1387. if (SubTabOffset != 0)
  1388. if (SubTabOffset - 1 != SubTabNum)
  1389. return;
  1390.  
  1391. static bool pressed = false;
  1392.  
  1393. if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(ControlsX, OffsetY, 10, 10))
  1394. {
  1395. if (pressed)
  1396. *item = !*item;
  1397. pressed = false;
  1398. }
  1399.  
  1400. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(ControlsX, OffsetY, 10, 10) && !pressed)
  1401. pressed = true;
  1402.  
  1403. //FilledRect(ControlsX2 - 24, OffsetY + 6, 24, 12, menu_background2);
  1404.  
  1405. if (*item == true)
  1406. g_pSurface->FilledRect(ControlsX, OffsetY, 10, 10, menu_accent);
  1407. else
  1408. g_pSurface->FilledRect(ControlsX, OffsetY, 10, 10, Color(37, 35, 37));
  1409.  
  1410. g_pSurface->OutlinedRect(ControlsX, OffsetY, 10, 10, Color(0, 0, 0));
  1411. g_pSurface->DrawT(ControlsX + 19, OffsetY, menu_text, g::EspTahoma, false, name.c_str());
  1412.  
  1413. /*if (g_pSurface->MouseInRegion(ControlsX2 - 24, OffsetY + 6, 24, 12))
  1414. {
  1415. g_pSurface->OutlinedRect(ControlsX2 - 26, OffsetY + 4, 28, 16, Color(255, 255, 255));
  1416.  
  1417. if (!tooltip.empty())
  1418. {
  1419. RECT TextSize = g_pSurface->GetTextSizeRect(g::EspTahoma, tooltip.c_str());
  1420. Vector2D MousePos = g_pSurface->GetMousePosition();
  1421.  
  1422. g_pSurface->FilledRect(MousePos.x + 10, MousePos.y + 10, 32 + TextSize.right, 24, menu_background);
  1423. g_pSurface->OutlinedRect(MousePos.x + 10, MousePos.y + 10, 32 + TextSize.right, 24, menu_accent);
  1424.  
  1425. g_pSurface->DrawT(MousePos.x + 26, MousePos.y + 16, menu_text, g::EspTahoma, false, tooltip.c_str());
  1426. }
  1427. }*/
  1428. OldOffsetY = OffsetY;
  1429. OffsetY += 20;
  1430. PreviousControl = check_box;
  1431. }
  1432.  
  1433. void GradientV(int x, int y, int w, int h, Color c1, Color c2)
  1434. {
  1435. g_pSurface->FilledRect(x, y, w, h, c1);
  1436. BYTE first = c2.red;
  1437. BYTE second = c2.green;
  1438. BYTE third = c2.blue;
  1439. for (int i = 0; i < h; i++)
  1440. {
  1441. float fi = i, fh = h;
  1442. float a = fi / fh;
  1443. DWORD ia = a * 255;
  1444. g_pSurface->FilledRect(x, y + i, w, 1, Color(first, second, third, ia));
  1445. }
  1446. }
  1447. void Menu::Slider(int max, std::string name, int* item)
  1448. {
  1449. if (GroupTabBottom <= OffsetY + 35)
  1450. return;
  1451.  
  1452. if (TabOffset - 1 != TabNum || TabOffset == 0)
  1453. return;
  1454.  
  1455. if (SubTabOffset != 0)
  1456. if (SubTabOffset - 1 != SubTabNum)
  1457. return;
  1458.  
  1459. RECT TextSize = g_pSurface->GetTextSizeRect(g::EspTahoma, std::to_string(*item).c_str());
  1460.  
  1461. int width = 100;
  1462.  
  1463. float pixelValue = max / 101.f;
  1464.  
  1465. g_pSurface->DrawT(ControlsX - 8, OffsetY + 22, menu_text, g::Tahoma, false, "-");
  1466. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(ControlsX - 8, OffsetY + 22, 4, 8))
  1467. *item -= 1;
  1468.  
  1469. g_pSurface->DrawT(ControlsX + width + 4, OffsetY + 22, menu_text, g::Tahoma, false, "+");
  1470. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(ControlsX + width + 4, OffsetY + 22, 4, 8))
  1471. * item += 1;
  1472.  
  1473. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(ControlsX - 2, OffsetY + 24, width, 8))
  1474. *item = (g_pSurface->GetMousePosition().x - (ControlsX - 2)) * pixelValue;
  1475.  
  1476. if (*item > max)
  1477. *item = max;
  1478. if (*item < 0)
  1479. *item = 0;
  1480.  
  1481. g_pSurface->DrawT(ControlsX, OffsetY + 6, menu_text, g::EspTahoma, false, name.c_str());
  1482. //g_pSurface->DrawT(ControlsX2 - TextSize.right, OffsetY + 6, menu_text, g::EspTahoma, true, std::to_string(*item).c_str());
  1483.  
  1484.  
  1485. GradientV(ControlsX, OffsetY + 24, width, 15, Color(41, 40, 41, 255), Color(51, 50, 51, 255));
  1486. g_pSurface->FilledRect(ControlsX, OffsetY + 24, (*item / pixelValue), 15, menu_accent);
  1487. g_pSurface->DrawT(ControlsX + 50, OffsetY + 24, menu_text, g::EspSmallText, true, std::to_string(*item).c_str());
  1488. //g_pSurface->FilledRect(ControlsX, OffsetY + 24, width, 8, menu_background2);
  1489. //g_pSurface->FilledRect(ControlsX, OffsetY + 24, *item / pixelValue, 8, menu_accent);
  1490.  
  1491. // g_pSurface->FilledRect((ControlsX + (*item / pixelValue)) - 3, OffsetY + 22, 6, 12, Color(255, 255, 255));
  1492.  
  1493. OldOffsetY = OffsetY;
  1494. OffsetY += 45;
  1495. PreviousControl = slider;
  1496. }
  1497.  
  1498.  
  1499. void Menu::SliderFloat(float max, std::string name, float* item)
  1500. {
  1501. if (GroupTabBottom <= OffsetY + 16)
  1502. return;
  1503.  
  1504. if (TabOffset - 1 != TabNum || TabOffset == 0)
  1505. return;
  1506.  
  1507. if (SubTabOffset != 0)
  1508. if (SubTabOffset - 1 != SubTabNum)
  1509. return;
  1510.  
  1511. RECT TextSize = g_pSurface->GetTextSizeRect(g::EspTahoma, std::to_string(*item).c_str());
  1512.  
  1513. int width = ControlsX2 - ControlsX;
  1514.  
  1515. float pixelValue = max / 265.f;
  1516.  
  1517. g_pSurface->DrawT(ControlsX - 8, OffsetY + 22, menu_text, g::Tahoma, false, "-");
  1518. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(ControlsX - 8, OffsetY + 22, 4, 8))
  1519. * item -= 1;
  1520.  
  1521. g_pSurface->DrawT(ControlsX + width + 4, OffsetY + 22, menu_text, g::Tahoma, false, "+");
  1522. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(ControlsX + width + 4, OffsetY + 22, 4, 8))
  1523. * item += 1;
  1524.  
  1525. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(ControlsX - 2, OffsetY + 24, width, 8))
  1526. * item = (g_pSurface->GetMousePosition().x - (ControlsX - 2)) * pixelValue;
  1527.  
  1528. if (*item > max)
  1529. * item = max;
  1530. if (*item < 0.f)
  1531. * item = 0.f;
  1532.  
  1533. g_pSurface->DrawT(ControlsX, OffsetY + 6, menu_text, g::EspTahoma, false, name.c_str());
  1534. g_pSurface->DrawT(ControlsX2 - TextSize.right, OffsetY + 6, menu_text, g::EspTahoma, true, std::to_string(*item).c_str());
  1535.  
  1536. g_pSurface->RoundedFilledRect(ControlsX, OffsetY + 24, width, 8, 4, menu_background2);
  1537. g_pSurface->RoundedFilledRect(ControlsX, OffsetY + 24, *item / pixelValue, 8, 4, menu_accent);
  1538. g_pSurface->FilledRect((ControlsX + (*item / pixelValue)) - 3, OffsetY + 22, 6, 12, Color(255, 255, 255));
  1539.  
  1540. OldOffsetY = OffsetY;
  1541. OffsetY += 36;
  1542. PreviousControl = sliderfloat;
  1543. }
  1544.  
  1545. void Menu::ComboBox(std::string name, std::vector< std::string > itemname, int* item)
  1546. {
  1547. if (GroupTabBottom <= OffsetY + 16)
  1548. return;
  1549.  
  1550. if (TabOffset - 1 != TabNum || TabOffset == 0)
  1551. return;
  1552.  
  1553. if (SubTabOffset != 0)
  1554. if (SubTabOffset - 1 != SubTabNum)
  1555. return;
  1556.  
  1557. bool pressed = false;
  1558. bool open = false;
  1559. static bool selectedOpened = false;
  1560. static bool clickRest;
  1561. static bool rest;
  1562. static std::string nameSelected;
  1563.  
  1564. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(ControlsX + 153, OffsetY, 100, 16) && !clickRest)
  1565. {
  1566. nameSelected = name;
  1567. pressed = true;
  1568. clickRest = true;
  1569. }
  1570. else if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(ControlsX + 153, OffsetY, 100, 16))
  1571. clickRest = false;
  1572.  
  1573. if (pressed)
  1574. {
  1575. if (!rest)
  1576. selectedOpened = !selectedOpened;
  1577.  
  1578. rest = true;
  1579. }
  1580. else
  1581. rest = false;
  1582.  
  1583. if (nameSelected == name)
  1584. open = selectedOpened;
  1585.  
  1586. int arrowpos = 240;
  1587.  
  1588. g_pSurface->DrawT(ControlsX, OffsetY + 6, menu_text, g::EspTahoma, false, name.c_str());
  1589.  
  1590. if (g_pSurface->MouseInRegion(ControlsX + 153, OffsetY + 2, 100, 16))
  1591. {
  1592. g_pSurface->OutlinedRect(ControlsX + 151, OffsetY, 104, 20, Color(255, 255, 255));
  1593. }
  1594. g_pSurface->FilledRect(ControlsX + 153, OffsetY + 2, 100, 16, menu_background2);
  1595. g_pSurface->FilledRect(ControlsX + arrowpos + 4, OffsetY + 2 + 7, 5, 1, menu_background2);
  1596. g_pSurface->FilledRect(ControlsX + arrowpos + 5, OffsetY + 2 + 8, 3, 1, menu_background2);
  1597. g_pSurface->FilledRect(ControlsX + arrowpos + 6, OffsetY + 2 + 9, 1, 1, menu_background2);
  1598.  
  1599. if (open)
  1600. {
  1601. g_pSurface->FilledRect(ControlsX + 153, OffsetY + 2, 100, 17 + (itemname.size() * 16), menu_background2);
  1602. g_pSurface->FilledRect(ControlsX + 153, OffsetY + 2, 100, 16, menu_background2);
  1603. g_pSurface->FilledRect(ControlsX + arrowpos + 4, OffsetY + 2 + 7, 5, 1, menu_background2);
  1604. g_pSurface->FilledRect(ControlsX + arrowpos + 5, OffsetY + 2 + 8, 3, 1, menu_background2);
  1605. g_pSurface->FilledRect(ControlsX + arrowpos + 6, OffsetY + 2 + 9, 1, 1, menu_background2);
  1606.  
  1607. for (int i = 0; i < itemname.size(); i++)
  1608. {
  1609. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(ControlsX + 153, OffsetY + 2 + 16 + i * 16, 100, 16))
  1610. *item = i;
  1611.  
  1612. if (*item == i)
  1613. g_pSurface->FilledRect(ControlsX + 153, OffsetY + 2 + 16 + (i * 16), 100, 20, menu_background2);
  1614.  
  1615. g_pSurface->DrawT(ControlsX + 159, OffsetY + 2 + 16 + (i * 16), menu_text, g::EspTahoma, false, itemname.at(i).c_str());
  1616. }
  1617. }
  1618.  
  1619. g_pSurface->DrawT(ControlsX + 159, OffsetY + 2, menu_text, g::EspTahoma, false, itemname.at(*item).c_str());
  1620.  
  1621. OldOffsetY = OffsetY;
  1622.  
  1623. if (open)
  1624. OffsetY += 24 + (itemname.size() * 16);
  1625. else
  1626. OffsetY += 24;
  1627.  
  1628. PreviousControl = combo_box;
  1629. }
  1630.  
  1631. void Menu::ColorPicker(std::string name, ColorV2& item) // best coder in the universe
  1632. {
  1633. if (GroupTabBottom <= OffsetY + 16)
  1634. return;
  1635.  
  1636. if (TabOffset - 1 != TabNum || TabOffset == 0)
  1637. return;
  1638.  
  1639. if (SubTabOffset != 0)
  1640. if (SubTabOffset - 1 != SubTabNum)
  1641. return;
  1642.  
  1643. if (PreviousControl == slider || PreviousControl == -1)
  1644. return;
  1645.  
  1646. int CtrXoffset = 0;
  1647.  
  1648. if (PreviousControl != check_box)
  1649. CtrXoffset = 132;
  1650. else
  1651. CtrXoffset = 165;
  1652.  
  1653. int yoffset = OldOffsetY + 6;
  1654. int xoffset = ControlsX + 330;
  1655.  
  1656. Color rainbow;
  1657.  
  1658. bool pressed = false;
  1659. bool open = false;
  1660. static bool selectedOpened = false;
  1661. static bool clickRest;
  1662. static bool rest;
  1663. static std::string nameSelected;
  1664.  
  1665. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(ControlsX + CtrXoffset, OldOffsetY, 16, 16) && !clickRest)
  1666. {
  1667. nameSelected = name;
  1668. pressed = true;
  1669. clickRest = true;
  1670. }
  1671. else if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(ControlsX + CtrXoffset, OldOffsetY, 16, 16))
  1672. clickRest = false;
  1673.  
  1674. if (pressed)
  1675. {
  1676. if (!rest)
  1677. selectedOpened = !selectedOpened;
  1678.  
  1679. rest = true;
  1680. }
  1681. else
  1682. rest = false;
  1683.  
  1684. if (nameSelected == name)
  1685. open = selectedOpened;
  1686.  
  1687. if (open)
  1688. {
  1689. g_pSurface->RoundedFilledRect(xoffset, OldOffsetY, 100, 20, 5, Color(0, 0, 0, 255));
  1690. g_pSurface->RoundedFilledRect(xoffset, OldOffsetY + 100, 100, 20, 5, Color(255, 255, 255, 255));
  1691.  
  1692. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(xoffset, OldOffsetY, 100, 10))
  1693. {
  1694. item.red = 0;
  1695. item.green = 0;
  1696. item.blue = 0;
  1697. item.alpha = 255;
  1698. }
  1699.  
  1700. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(xoffset, OldOffsetY + 110, 100, 10))
  1701. {
  1702. item.red = 255;
  1703. item.green = 255;
  1704. item.blue = 255;
  1705. item.alpha = 255;
  1706. }
  1707.  
  1708. for (int i = 0; i < 100; i++)
  1709. {
  1710. if (xoffset >= ControlsX + 430)
  1711. {
  1712. xoffset -= 100;
  1713. yoffset += 10;
  1714. }
  1715.  
  1716. float hue = (i * .01f);
  1717.  
  1718. rainbow.FromHSV(hue, 1.f, 1.f);
  1719.  
  1720. g_pSurface->FilledRect(xoffset, yoffset, 10, 10, rainbow);
  1721.  
  1722. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(xoffset, yoffset, 10, 10))
  1723. {
  1724. item.red = rainbow.red;
  1725. item.green = rainbow.green;
  1726. item.blue = rainbow.blue;
  1727. item.alpha = 255.f;
  1728. }
  1729.  
  1730. xoffset += 10;
  1731. }
  1732. }
  1733.  
  1734. rainbow.red = item.red;
  1735. rainbow.green = item.green;
  1736. rainbow.blue = item.blue;
  1737. rainbow.alpha = 255;
  1738.  
  1739. g_pSurface->FilledRect(ControlsX + CtrXoffset, OldOffsetY, 16, 12, rainbow);
  1740. g_pSurface->OutlinedRect(ControlsX + CtrXoffset, OldOffsetY, 16, 12, menu_background2);
  1741. }
  1742.  
  1743. void Menu::KeyBind(std::string name, int* item) // needs to be working with mouse keys pls fix
  1744. {
  1745. if (ControlsReturn)
  1746. return;
  1747.  
  1748. if (GroupTabBottom <= OffsetY + 16)
  1749. return;
  1750.  
  1751. if (TabOffset - 1 != TabNum || TabOffset == 0)
  1752. return;
  1753.  
  1754. if (SubTabOffset != 0)
  1755. if (SubTabOffset - 1 != SubTabNum)
  1756. return;
  1757.  
  1758. static bool gotKey = false;
  1759. bool pressed = false;
  1760. if (gotKey)
  1761. pressed = true;
  1762. gotKey = false;
  1763. bool open = false;
  1764. static bool selectedOpened = false;
  1765. static bool clickRest;
  1766. static bool rest;
  1767. static std::string nameSelected;
  1768.  
  1769. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(ControlsX + 153, OffsetY, 140, 16) && !clickRest)
  1770. {
  1771. nameSelected = name;
  1772. pressed = true;
  1773. clickRest = true;
  1774. }
  1775. else if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(ControlsX + 153, OffsetY, 140, 16))
  1776. clickRest = false;
  1777.  
  1778. if (pressed)
  1779. {
  1780. if (!rest)
  1781. selectedOpened = !selectedOpened;
  1782.  
  1783. rest = true;
  1784. }
  1785. else
  1786. rest = false;
  1787.  
  1788. if (nameSelected == name)
  1789. open = selectedOpened;
  1790.  
  1791. g_pSurface->DrawT(ControlsX, OffsetY, Color(255, 255, 255, 255), g::EspTahoma, false, name.c_str());
  1792. g_pSurface->AutoGradientRect(ControlsX + 153, OffsetY, 140, 16, Color(54, 53, 55, 255));
  1793.  
  1794. if (open)
  1795. {
  1796. for (int i = 0; i < 255; i++)
  1797. {
  1798. if ((GetAsyncKeyState(i) & 0x8000) && i != 1 && i != 45)
  1799. {
  1800. *item = i;
  1801. gotKey = true;
  1802. }
  1803. }
  1804. g_pSurface->AutoGradientRect(ControlsX + 153, OffsetY, 140, 16, Color(33, 33, 33, 255));
  1805. }
  1806.  
  1807. g_pSurface->DrawT(ControlsX + 159, OffsetY, Color(255, 255, 255, 255), g::EspTahoma, false, std::string(1, char(*item)).c_str()); // K LOL
  1808.  
  1809. OldOffsetY = OffsetY;
  1810. OffsetY += 18;
  1811.  
  1812. PreviousControl = key_bind;
  1813. }
  1814.  
  1815.  
  1816. void Menu::Button(std::string text, Menu::ButtonCallback_t callback)
  1817. {
  1818. if (GroupTabBottom <= OffsetY + 16)
  1819. return;
  1820.  
  1821. if (TabOffset - 1 != TabNum || TabOffset == 0)
  1822. return;
  1823.  
  1824. if (SubTabOffset != 0)
  1825. if (SubTabOffset - 1 != SubTabNum)
  1826. return;
  1827.  
  1828. bool pressed = false;
  1829. static bool clickRest;
  1830. static bool rest;
  1831.  
  1832. int height = 20;
  1833. RECT TextSize = g_pSurface->GetTextSizeRect(g::EspTahoma, text.c_str());
  1834. int width = 16 + TextSize.right;
  1835.  
  1836. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(ControlsX, OffsetY + 6, width, height) && !clickRest)
  1837. {
  1838. pressed = true;
  1839. clickRest = true;
  1840.  
  1841. g_pSurface->FilledRect(ControlsX, OffsetY + 6, width, height, menu_accent);
  1842. }
  1843. else if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(ControlsX, OffsetY + 5, width, height))
  1844. clickRest = false;
  1845.  
  1846. if (g_pSurface->MouseInRegion(ControlsX, OffsetY + 6, width, height))
  1847. {
  1848. g_pSurface->OutlinedRect(ControlsX - 2, OffsetY + 4, width + 4, height + 4, Color(255, 255, 255));
  1849. }
  1850.  
  1851. if (pressed)
  1852. {
  1853. if (!rest)
  1854. callback();
  1855.  
  1856. rest = true;
  1857. }
  1858. else
  1859. {
  1860. rest = false;
  1861. g_pSurface->FilledRect(ControlsX, OffsetY + 6, width, height, menu_accent);
  1862. }
  1863.  
  1864. g_pSurface->DrawT(ControlsX + (width / 2) - 2, OffsetY + 8, menu_text, g::EspTahoma, true, text.c_str());
  1865.  
  1866. OldOffsetY = OffsetY;
  1867.  
  1868. OffsetY += 32;
  1869.  
  1870. PreviousControl = button;
  1871. }
  1872.  
  1873. void Menu::Space(int spaceval)
  1874. {
  1875. OffsetY += spaceval;
  1876. PreviousControl = spacer;
  1877. }
  1878.  
  1879. bool keys[256];
  1880. bool oldKeys[256];
  1881.  
  1882. bool GetKeyPress(unsigned int key)
  1883. {
  1884. if (keys[key] == true && oldKeys[key] == false)
  1885. return true;
  1886. return false;
  1887. }
  1888.  
  1889. void Menu::TextBox(std::string name, std::string* text)
  1890. {
  1891. if (TabOffset - 1 != TabNum || TabOffset == 0)
  1892. return;
  1893.  
  1894. if (SubTabOffset != 0)
  1895. if (SubTabOffset - 1 != SubTabNum)
  1896. return;
  1897.  
  1898. if (GroupTabBottom <= OffsetY + 16)
  1899. return;
  1900.  
  1901. bool pressed = false;
  1902. bool open = false;
  1903. static bool selected_opened = false;
  1904. static bool click_rest;
  1905. static bool rest;
  1906. static std::string name_selected;
  1907.  
  1908. int ComboSize = 127; // 163
  1909. int ComboSizeH = 127; // 163
  1910. static int offset = 0;
  1911. if (name == "")
  1912. {
  1913. offset = 0;
  1914. }
  1915. else
  1916. {
  1917. offset = 14;
  1918. }
  1919.  
  1920. std::copy(keys, keys + 255, oldKeys);
  1921. for (int x = 0; x < 255; x++)
  1922. {
  1923. //oldKeys[x] = oldKeys[x] & keys[x];
  1924. keys[x] = (GetAsyncKeyState(x));
  1925. }
  1926.  
  1927.  
  1928. if (menuOpened)
  1929. {
  1930. if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(ControlsX + 225, OffsetY + 1, 15, 8) && !
  1931. click_rest)
  1932. {
  1933. name_selected = name;
  1934. pressed = true;
  1935. click_rest = true;
  1936. }
  1937. else if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(ControlsX + 225, OffsetY + 1, 15, 8))
  1938. click_rest = false;
  1939.  
  1940. if (pressed)
  1941. {
  1942. if (!rest)
  1943. selected_opened = !selected_opened;
  1944. rest = true;
  1945. }
  1946. else
  1947. rest = false;
  1948.  
  1949. if (name_selected == name)
  1950. open = selected_opened;
  1951. }
  1952.  
  1953. const char* strg = text->c_str();
  1954. if (open)
  1955. {
  1956. for (int i = 0; i < 255; i++)
  1957. {
  1958. if (GetKeyPress(i))
  1959. {
  1960. if (i == VK_ESCAPE || i == VK_RETURN || i == VK_INSERT)
  1961. {
  1962. open = false;
  1963. return;
  1964. }
  1965.  
  1966. if (i == VK_BACK && strlen(strg) != 0)
  1967. {
  1968. *text = text->substr(0, strlen(strg) - 1);
  1969. }
  1970.  
  1971. if (strlen(strg) < 6 && (i == 0x30 || i == 0x31 || i == 0x32 || i == 0x33 || i == 0x34 || i == 0x35 || i
  1972. == 0x36 || i == 0x37 || i == 0x38 || i == 0x39 || i == VK_NUMPAD0 || i == VK_NUMPAD1 || i ==
  1973. VK_NUMPAD2 || i == VK_NUMPAD3 || i == VK_NUMPAD4 || i == VK_NUMPAD5 || i == VK_NUMPAD6 || i ==
  1974. VK_NUMPAD7 || i == VK_NUMPAD8 || i == VK_NUMPAD9))
  1975. {
  1976. *text = *text + g_Hotkeys.KeyDigits[i];
  1977. return;
  1978. }
  1979. }
  1980. }
  1981. }
  1982.  
  1983. const char* cstr = text->c_str();
  1984. g_pSurface->FilledRect(ControlsX + 20, OffsetY, ComboSize, 20, button_dark);
  1985. g_pSurface->OutlinedRect(ControlsX + 20, OffsetY, ComboSize, 20, menu_text);
  1986. g_pSurface->DrawT(ControlsX + 20 + 5, OffsetY + 3, menu_text, g::EspTahoma, false, cstr);
  1987.  
  1988. OffsetY += 29;
  1989. }
  1990.  
  1991. void Menu::Text(std::string text)
  1992. {
  1993. if (GroupTabBottom <= OffsetY + 16)
  1994. return;
  1995.  
  1996. if (TabOffset - 1 != TabNum || TabOffset == 0)
  1997. return;
  1998.  
  1999. if (SubTabOffset != 0)
  2000. if (SubTabOffset - 1 != SubTabNum)
  2001. return;
  2002. g_pSurface->DrawT(ControlsX, OffsetY + 6, menu_text, g::EspTahoma, false, text.c_str());
  2003. OffsetY += 24;
  2004. PreviousControl = label;
  2005. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement