SHARE
TWEET

Untitled

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