Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Menu.h"
- #include "TGFCfg.h"
- #include "../SDK/Vector.h"
- #include "../SDK/ISurface.h"
- #include "../Utils/Color.h"
- #include "../Utils/GlobalVars.h"
- #include "config.h"
- Menu g_Menu;
- bool manually_set_key = false;
- /*
- *
- * CREDITS TO : stickrpg
- *
- * BEST MENU FRAMEWORK IN EXISTENCE
- *
- */
- enum TABS
- {
- Aimbot = 0,
- Visuals = 1,
- Misc = 2
- };
- #define or ||
- #define and &&
- int TopLeftGroupBox_X = 5;
- int TopLeftGroupBox_X2 = 4;
- int TopLeftGroupBox_Y2 = 40 + (309 / 1.5) + 5;
- int TopLeftGroupBox_Y = 52 + (309 / 1.5) + 5;
- int GroupBoxSize_Width = 450 / 1.5;
- int GroupBoxSize_Height = 300 / 1.5; //30*
- void GradientV(int x, int y, int w, int h, Color c1, Color c2)
- {
- g_pSurface->FilledRect(x, y, w, h, c1);
- BYTE first = c2.red;
- BYTE second = c2.green;
- BYTE third = c2.blue;
- for (int i = 0; i < h; i++)
- {
- float fi = i, fh = h;
- float a = fi / fh;
- DWORD ia = a * 255;
- g_pSurface->FilledRect(x, y + i, w, 1, Color(first, second, third, ia));
- }
- }
- void GradientVEnd(int x, int y, int w, int h, Color c1, Color c2)
- {
- //g_pSurface->FilledRect(x, y, w, h, c1);
- BYTE first = c2.red;
- BYTE second = c2.green;
- BYTE third = c2.blue;
- for (float i = 0; i < h / 1.5; i++)
- {
- float fi = i, fh = h / 1.5;
- float a = fi / fh;
- DWORD ia = a * 255;
- g_pSurface->FilledRect(x, y + i, w, 2, Color(first, second, third, ia));
- }
- }
- void DrawESPPlayersSubTab(int& current_players_esp_subtab, int tab_amount, Vector _pos, int MenuAlpha_Main)
- {
- int in_sizew_esp_player_subtabs = (375 / 1.5) - 8;
- static std::string ESP_Player_SubTabs_Names[3] = { "Main", "Main PT 2", "Model" };
- for (int i = 0; i < tab_amount; i++)
- {
- RECT text_size2 = g_pSurface->GetTextSizeRect(Globals::WTFont, ESP_Player_SubTabs_Names[i].c_str());
- int tab_area[4] = {
- _pos.x + 9 + (i * (in_sizew_esp_player_subtabs / tab_amount)), _pos.y + 52 + 5,
- (in_sizew_esp_player_subtabs / tab_amount), 20
- };
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(tab_area[0], tab_area[1], tab_area[2],
- tab_area[3]))
- current_players_esp_subtab = i;
- if (current_players_esp_subtab == i)
- {
- g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(0, 255, 255, MenuAlpha_Main));
- 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));
- g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
- tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
- Color(0, 255, 255, MenuAlpha_Main), Globals::WTFont, false,
- ESP_Player_SubTabs_Names[i].c_str());
- }
- else
- {
- g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(127, 255, 0, MenuAlpha_Main));
- g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(0, 139, 139, MenuAlpha_Main));
- g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
- tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
- Color(0, 255, 255, MenuAlpha_Main), Globals::WTFont, false,
- ESP_Player_SubTabs_Names[i].c_str());
- }
- }
- }
- void DrawAimbotTargetSubTab(int& current_players_esp_subtab, int tab_amount, Vector _pos, int MenuAlpha_Main)
- {
- int in_sizew_esp_player_subtabs = (375 / 1.5) - 8;
- static std::string ESP_Player_SubTabs_Names[2] = { "Target", "Body-Aim" };
- for (int i = 0; i < tab_amount; i++)
- {
- RECT text_size2 = g_pSurface->GetTextSizeRect(Globals::WTFont, ESP_Player_SubTabs_Names[i].c_str());
- int tab_area[4] = {
- _pos.x + 9 + (i * (in_sizew_esp_player_subtabs / tab_amount)), _pos.y + TopLeftGroupBox_Y + 5,
- (in_sizew_esp_player_subtabs / tab_amount), 20
- };
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(tab_area[0], tab_area[1], tab_area[2],
- tab_area[3]))
- current_players_esp_subtab = i;
- // g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(23, 23, 25, MenuAlpha_Main));
- if (current_players_esp_subtab == i)
- {
- g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(0, 255, 255, MenuAlpha_Main));
- 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));
- g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
- tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
- Color(0, 255, 255, MenuAlpha_Main), Globals::WTFont, false,
- ESP_Player_SubTabs_Names[i].c_str());
- }
- else
- {
- g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(127, 255, 0, MenuAlpha_Main));
- g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(0, 139, 139, MenuAlpha_Main));
- g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
- tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
- Color(0, 255, 255, MenuAlpha_Main), Globals::WTFont, false,
- ESP_Player_SubTabs_Names[i].c_str());
- }
- }
- } //
- void DrawAimbotAccuracy_Subtab(int& current_players_esp_subtab, int tab_amount, Vector _pos, int MenuAlpha_Main)
- {
- int in_sizew_esp_player_subtabs = GroupBoxSize_Width - 9;
- static std::string ESP_Player_SubTabs_Names[6] = { "Auto", "Scout", "AWP", "H.Pistol", "Pistol", "Other" };
- for (int i = 0; i < tab_amount; i++)
- {
- RECT text_size2 = g_pSurface->GetTextSizeRect(Globals::WTFont, ESP_Player_SubTabs_Names[i].c_str());
- int tab_area[4] = { // 5 + 91
- _pos.x + TopLeftGroupBox_X + GroupBoxSize_Width + 5 + 60 + (i * (in_sizew_esp_player_subtabs / tab_amount)),
- _pos.y + 18 + 5, (in_sizew_esp_player_subtabs / tab_amount), 10
- // _pos.y + 45 + 4, (in_sizew_esp_player_subtabs / tab_amount), 20
- };
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(tab_area[0], tab_area[1], tab_area[2],
- tab_area[3]))
- current_players_esp_subtab = i;
- if (current_players_esp_subtab == i)
- {
- g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(18, 18, 18, MenuAlpha_Main));
- 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));
- g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
- tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
- Color(255, 255, 255, MenuAlpha_Main), Globals::WTFont, false,
- ESP_Player_SubTabs_Names[i].c_str());
- }
- else
- {
- g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(18, 18, 18, MenuAlpha_Main));
- g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(0, 139, 139, MenuAlpha_Main));
- g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
- tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
- Color(0, 255, 255, MenuAlpha_Main), Globals::WTFont, false,
- ESP_Player_SubTabs_Names[i].c_str());
- }
- }
- }
- void DrawESPSECS_Subtab(int& current_players_esp_subtab, int tab_amount, Vector _pos, int MenuAlpha_Main)
- {
- int in_sizew_esp_player_subtabs = GroupBoxSize_Width - 8;
- static std::string ESP_Player_SubTabs_Names[2] = { "World", "Local" };
- for (int i = 0; i < tab_amount; i++)
- {
- RECT text_size2 = g_pSurface->GetTextSizeRect(Globals::WTFont, ESP_Player_SubTabs_Names[i].c_str());
- int tab_area[4] = {
- //_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
- _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
- };
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(tab_area[0], tab_area[1], tab_area[2],
- tab_area[3]))
- current_players_esp_subtab = i;
- if (current_players_esp_subtab == i)
- {
- g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(18, 18, 18, MenuAlpha_Main));
- 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));
- g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
- tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
- Color(255, 255, 255, MenuAlpha_Main), Globals::WTFont, false,
- ESP_Player_SubTabs_Names[i].c_str());
- }
- else
- {
- g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(18, 18, 18, MenuAlpha_Main));
- g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(0, 139, 139, MenuAlpha_Main));
- g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
- tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
- Color(0, 255, 255, MenuAlpha_Main), Globals::WTFont, false,
- ESP_Player_SubTabs_Names[i].c_str());
- }
- }
- }
- void DrawESPSP_Subtab(int& current_players_esp_subtab, int tab_amount, Vector _pos, int MenuAlpha_Main)
- {
- int in_sizew_esp_player_subtabs = GroupBoxSize_Width - 7;
- static std::string ESP_Player_SubTabs_Names[3] = { "General", "Local", "Misc" };
- for (int i = 0; i < tab_amount; i++)
- {
- RECT text_size2 = g_pSurface->GetTextSizeRect(Globals::WTFont, ESP_Player_SubTabs_Names[i].c_str());
- int tab_area[4] = {
- _pos.x + 40 + (i * (in_sizew_esp_player_subtabs / tab_amount)), _pos.y + 30 + 5,(in_sizew_esp_player_subtabs / tab_amount), 10
- };
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(tab_area[0], tab_area[1], tab_area[2],
- tab_area[3]))
- current_players_esp_subtab = i;
- if (current_players_esp_subtab == i)
- {
- g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(18, 18, 18, MenuAlpha_Main));
- 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));
- g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
- tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
- Color(255, 255, 255, MenuAlpha_Main), Globals::WTFont, false,
- ESP_Player_SubTabs_Names[i].c_str());
- }
- else
- {
- g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(18, 18, 18, MenuAlpha_Main));
- g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(0, 139, 139, MenuAlpha_Main));
- g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
- tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
- Color(0, 255, 255, MenuAlpha_Main), Globals::WTFont, false,
- ESP_Player_SubTabs_Names[i].c_str());
- }
- }
- } //
- void DrawAntiAim_Subtab(int& current_players_esp_subtab, int tab_amount, Vector _pos, int MenuAlpha_Main)
- {
- int in_sizew_esp_player_subtabs = GroupBoxSize_Width - 7;
- static std::string ESP_Player_SubTabs_Names[3] = { "General", "Pitch/Yaw", "LBY Breaker" };
- for (int i = 0; i < tab_amount; i++)
- {
- RECT text_size2 = g_pSurface->GetTextSizeRect(Globals::WTFont, ESP_Player_SubTabs_Names[i].c_str());
- int tab_area[4] = {
- // _pos.x + TopLeftGroupBox_X + GroupBoxSize_Width + 4 + 90 + (i * (in_sizew_esp_player_subtabs / tab_amount)),
- // _pos.y + 20 + 3, (in_sizew_esp_player_subtabs / tab_amount), 20
- _pos.x + 40 + (i * (in_sizew_esp_player_subtabs / tab_amount)), _pos.y + 30 + 5,(in_sizew_esp_player_subtabs / tab_amount), 10
- // _pos.x + 52 + (i * (in_sizew_esp_player_subtabs / tab_amount)), _pos.y + 52 + 3,(in_sizew_esp_player_subtabs / tab_amount), 20
- };
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(tab_area[0], tab_area[1], tab_area[2],
- tab_area[3]))
- current_players_esp_subtab = i;
- if (current_players_esp_subtab == i)
- {
- g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(18, 18, 18, MenuAlpha_Main));
- 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));
- g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
- tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
- Color(255, 255, 255, MenuAlpha_Main), Globals::WTFont, false,
- ESP_Player_SubTabs_Names[i].c_str());
- }
- else
- {
- g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(18, 18, 18, MenuAlpha_Main));
- g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(0, 139, 139, MenuAlpha_Main));
- g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
- tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
- Color(0, 255, 255, MenuAlpha_Main), Globals::WTFont, false,
- ESP_Player_SubTabs_Names[i].c_str());
- }
- }
- } //
- #include <tuple>
- class vars : public singleton< vars > {
- private:
- public:
- bool visuals_box = false;
- };
- void DrawAimbotMain_Subtab(int& current_players_esp_subtab, int tab_amount, Vector _pos, int MenuAlpha_Main)
- {
- int in_sizew_esp_player_subtabs = GroupBoxSize_Width - 8;
- static std::string ESP_Player_SubTabs_Names[2] = { "Main", "Resolver" };
- for (int i = 0; i < tab_amount; i++)
- {
- RECT text_size2 = g_pSurface->GetTextSizeRect(Globals::WTFont, ESP_Player_SubTabs_Names[i].c_str());
- int tab_area[4] = {
- _pos.x + 9 + (i * (in_sizew_esp_player_subtabs / tab_amount)), _pos.y + 52 + 5,
- (in_sizew_esp_player_subtabs / tab_amount), 20
- };
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(tab_area[0], tab_area[1], tab_area[2],
- tab_area[3]))
- current_players_esp_subtab = i;
- if (current_players_esp_subtab == i)
- {
- g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(0, 255, 255, MenuAlpha_Main));
- 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));
- g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
- tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
- Color(0, 255, 255, MenuAlpha_Main), Globals::WTFont, false,
- ESP_Player_SubTabs_Names[i].c_str());
- }
- else
- {
- g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(127, 255, 0, MenuAlpha_Main));
- g_pSurface->FilledRect(tab_area[0], tab_area[1] + tab_area[3], tab_area[2], 3, Color(0, 139, 139, MenuAlpha_Main));
- g_pSurface->DrawT(tab_area[0] + (((in_sizew_esp_player_subtabs / tab_amount) / 2) - (text_size2.right / 2)),
- tab_area[1] + (tab_area[3] / 2) - (text_size2.bottom / 2),
- Color(0, 255, 255, MenuAlpha_Main), Globals::WTFont, false,
- ESP_Player_SubTabs_Names[i].c_str());
- }
- // g_pSurface->OutlinedRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(40, 44, 53, MenuAlpha_Main));
- }
- } //
- std::ptrdiff_t ExtraOffsets::deadflag = NULL;
- std::string config_slots[14] = {
- "legit 1", "legit 2", "legit 3", "legit 4", "legit 5", "hvh 1", "hvh 2", "hvh 3", "hvh 4", "hvh 5", "custom 1", "custom 2",
- "custom 3", "custom 4"
- };
- static int save_slot = 0;
- #include "../Features/Visuals/EventLogging.h"
- void Save_Config()
- {
- Config2->Save(config_slots[save_slot]);
- std::string string_to_add;
- string_to_add += "saved '";
- string_to_add += config_slots[save_slot];
- string_to_add += "'.";
- c_event_logs::get().add(string_to_add, Color(255, 255, 255, 255));
- }
- void Load_Config()
- {
- Config2->Load(config_slots[save_slot]);
- std::string string_to_add;
- string_to_add += "loaded '";
- string_to_add += config_slots[save_slot];
- string_to_add += "'.";
- c_event_logs::get().add(string_to_add, Color(255, 255, 255, 255));
- }
- void Export_Config()
- {
- Config2->export_to_clipboard("export");
- }
- void Import_Config()
- {
- Config2->import_from_clipboard("import");
- }
- void Save()
- {
- std::string ConfigName;
- switch (2)
- {
- case 0: ConfigName = "1";
- break;
- case 1: ConfigName = "2";
- break;
- case 2: ConfigName = "3";
- break;
- case 3: ConfigName = "4";
- break;
- case 4: ConfigName = "5";
- break;
- }
- Config2->Save(ConfigName);
- }
- void SkinTrolling()
- {
- static auto nameConvar = g_pCvar->FindVar("name");
- nameConvar->fnChangeCallback = 0;
- static auto do_once = (nameConvar->SetValue("\n���"), true);
- nameConvar->SetValue(u8" \x01\x0B\x10 sizzeR \x01has opened a container and found:\x02 ★ M9 Bayonet | Doppler");
- }
- void GradientH(int x, int y, int w, int h, Color c1, Color c2)
- {
- g_pSurface->FilledRect(x, y, w, h, c1);
- BYTE first = c2.red;
- BYTE second = c2.green;
- BYTE third = c2.blue;
- for (int i = 0; i < w; i++)
- {
- float fi = i, fw = w;
- float a = fi / fw;
- DWORD ia = a * 255;
- g_pSurface->FilledRect(x + i, y, 1, h, Color(first, second, third, ia));
- }
- }
- #include <experimental/filesystem>
- #include <filesystem>
- #include <iostream>
- #include <iostream>
- #include <iomanip>
- #include <fstream>
- using namespace std;
- #include "../SDK/ClientClass.h"
- #include "../SDK/IBaseClientDll.h"
- DWORD FindSig(DWORD dwAddress, DWORD dwLength, const char* szPattern)
- {
- if (!dwAddress || !dwLength || !szPattern)
- return 0;
- const char* pat = szPattern;
- DWORD firstMatch = NULL;
- for (DWORD pCur = dwAddress; pCur < dwLength; pCur++)
- {
- if (!*pat)
- return firstMatch;
- if (*(PBYTE)pat == '\?' || *(BYTE*)pCur == GET_BYTE(pat))
- {
- if (!firstMatch)
- firstMatch = pCur;
- if (!pat[2])
- return firstMatch;
- if (*(PWORD)pat == '\?\?' || *(PBYTE)pat != '\?')
- pat += 3;
- else pat += 2;
- }
- else
- {
- pat = szPattern;
- firstMatch = 0;
- }
- }
- return 0;
- }
- DWORD FindSignaturenew(const char* szModuleName, const char* PatternName, char* szPattern)
- {
- HMODULE hModule = GetModuleHandleA(szModuleName);
- PIMAGE_DOS_HEADER pDOSHeader = (PIMAGE_DOS_HEADER)hModule;
- PIMAGE_NT_HEADERS pNTHeaders = (PIMAGE_NT_HEADERS)(((DWORD)hModule) + pDOSHeader->e_lfanew);
- DWORD ret = FindSig(((DWORD)hModule) + pNTHeaders->OptionalHeader.BaseOfCode, ((DWORD)hModule) + pNTHeaders->OptionalHeader.SizeOfCode, szPattern);;
- return ret;
- }
- void ForceDaUpdate() {
- }
- std::string text_uwu;
- bool dont_recieve_input = false;
- void Menu::Render()
- {
- static bool _pressed = true;
- if (!_pressed && GetAsyncKeyState(VK_INSERT))
- _pressed = true;
- else if (_pressed && !GetAsyncKeyState(VK_INSERT))
- {
- _pressed = false;
- menuOpened = !menuOpened;
- }
- g_pEngine->GetScreenSize(screen_width, screen_width);
- static Vector2D _mouse_pos;
- static int groupbox_bottom;
- static int _drag_x = 300;
- static int _drag_y = 300;
- static int _drag1_x = 300;
- static int _drag1_y = 300;
- int _widthbggang = 595; // parte de tras
- int _heightbggang = 693; // parte de tras
- int _widthtdatras = 615; // parte de tras
- int _heightabs = 25; // parte de tras
- int _widthtabs = 690; // parte de tras
- int _heightdatras = 710; // parte de tras
- int _widthrbline = 595; // linha rainbow
- int _heightrbline = 3; // linha rainbow
- int _width = 700;
- int _height = 633; //
- int _width1 = 700;
- int _height1 = 200; //
- static Vector2D oldPos;
- static Vector2D mousePos;
- static bool _dragging = false;
- bool _click = false;
- static bool _resizing = false;
- g_InputSystem->EnableInput(!menuOpened);
- if (menuOpened)
- {
- MenuAlpha_Main = min(MenuAlpha_Main + 15, 255);
- MenuAlpha_Text = min(MenuAlpha_Text + 5, 255);
- //MenuAlpha_Main = 255;
- //MenuAlpha_Text = 255;
- if (GetAsyncKeyState(VK_LBUTTON))
- _click = true;
- Vector2D _mouse_pos = g_pSurface->GetMousePosition();
- if (_dragging and !_click)
- _dragging = false;
- if (_resizing and !_click)
- _resizing = false;
- if (_dragging and _click)
- {
- _pos.x = _mouse_pos.x - _drag_x;
- _pos.y = _mouse_pos.y - _drag_y;
- _pos1.x = _mouse_pos.x - _drag1_x;
- _pos1.y = _mouse_pos.y - _drag1_y;
- }
- //if (_resizing && _click) {
- // _width = _mouse_pos.x - _pos.x;
- // _height = _mouse_pos.y - _pos.y;
- // if (_width < 480) _width = 480;
- // if (_height < 340) _height = 340;
- // if (_width > 960) _width = 960;
- // if (_height > 680) _height = 680;
- //}
- if (g_pSurface->MouseInRegion(_pos.x - 96, _pos.y + 11, _width - 10, 13))
- {
- _dragging = true;
- _drag_x = _mouse_pos.x - _pos.x;
- _drag_y = _mouse_pos.y - _pos.y;
- _pos1.x = _mouse_pos.x - _drag1_x;
- _pos1.y = _mouse_pos.y - _drag1_y;
- }
- // if (mouse_in_params(_pos.x + 20, _pos.y + 20, _width - 10, _height - 10))
- // {
- // _resizing = true;
- // }
- }
- else
- {
- MenuAlpha_Main = max(MenuAlpha_Main - 15, 0);
- MenuAlpha_Text = max(MenuAlpha_Text - 25, 0);
- //MenuAlpha_Main = 0;
- //MenuAlpha_Text = 0;
- }
- //if (!menuOpened)
- // return;
- if (menuOpened) {
- }
- else {
- }
- int sum = 0;
- int x;
- ifstream inFile;
- string path;
- static string username;
- static string rent;
- static bool GrabName = true;
- if (GrabName) {
- path = getenv("appdata");
- //cout << "appdata=" << path << endl;
- path += "\\xy0_login";
- inFile.open(path);
- inFile >> username >> rent;
- cout << username << rent << endl;
- GrabName = false;
- }
- //cout << name << rent << endl;
- //cout << "path=" << path << endl;
- /*// SKEET SKEET MENU SKEET
- g_pSurface->FilledRect(_pos.x + 1, _pos.y + 20, _width + 52, _height + 50, Color(18, 18, 18, MenuAlpha_Main));
- g_pSurface->FilledRect(_pos.x - 97.8, _pos.y + 20, 100, _height + 50, Color(12, 12, 12, MenuAlpha_Main));
- // TOP
- // BIG LINE TOP
- g_pSurface->FilledRect(_pos.x - 97.8, _pos.y + 11, _width + 151, 7, Color(39, 39, 39, MenuAlpha_Main));
- // SMOLL LINE TOP
- g_pSurface->FilledRect(_pos.x - 97.8, _pos.y + 18, _width + 151, 2, Color(55, 55, 55, MenuAlpha_Main));
- // LEFT
- // SMOLL LINE LEFT
- g_pSurface->FilledRect(_pos.x - 97.8, _pos.y + 18, 2, _width + 31, Color(55, 55, 55, MenuAlpha_Main));
- // BIG LINE LEFT
- g_pSurface->FilledRect(_pos.x - 104, _pos.y + 11, 7, _width + 38, Color(39, 39, 39, MenuAlpha_Main));
- //ADITIONAL SMOLL LEFT
- g_pSurface->FilledRect(_pos.x - 105, _pos.y + 11, 2, _width + 43, Color(55, 55, 55, MenuAlpha_Main));
- //ADDITIONAL SMOLL BLACK LEFT
- g_pSurface->FilledRect(_pos.x - 106, _pos.y + 11, 2, _width + 45, Color(14, 14, 14, MenuAlpha_Main));
- // DOWN
- // SMALL LINE DOWN
- g_pSurface->FilledRect(_pos.x - 97.8, _pos.y + 642, _width + 151, 2, Color(55, 55, 55, MenuAlpha_Main));
- // BIG LINE DOWN
- g_pSurface->FilledRect(_pos.x - 104, _pos.y + 643, _width + 162, 7, Color(39, 39, 39, MenuAlpha_Main));
- // ADDITIONAL SMALL DOWN
- g_pSurface->FilledRect(_pos.x - 104, _pos.y + 647, _width + 162, 2, Color(55, 55, 55, MenuAlpha_Main));
- // SMALL BLACK LINE DOWN
- g_pSurface->FilledRect(_pos.x - 104, _pos.y + 648, _width + 164, 2, Color(14, 14, 14, MenuAlpha_Main));
- // RIGHT
- // LEFT
- // SMOLL LINE RIGHT
- g_pSurface->FilledRect(_pos.x + 645, _pos.y + 18, 2, _width + 31, Color(55, 55, 55, MenuAlpha_Main));
- // BIG LINE RIGHT
- g_pSurface->FilledRect(_pos.x + 646, _pos.y + 11, 7, _width + 38, Color(39, 39, 39, MenuAlpha_Main));
- //ADITIONAL SMOLL RIGHT
- g_pSurface->FilledRect(_pos.x + 651, _pos.y + 11, 2, _width + 43, Color(55, 55, 55, MenuAlpha_Main));
- //ADDITIONAL SMOLL BLACK RIGHT
- g_pSurface->FilledRect(_pos.x + 652, _pos.y + 11, 2, _width + 44, Color(14, 14, 14, MenuAlpha_Main));
- std::string MenuWatermark;
- MenuWatermark += username;
- #if _BETA
- MenuWatermark += " - ";
- MenuWatermark += "Beta";
- #endif
- static double rainbow;
- rainbow += 0.001;
- if (rainbow > 1.f)
- rainbow = 0;
- Color color = Color::FromHSB(rainbow, 1.f, 1.f);
- */
- /* static double rainbow;
- rainbow += 0.001;
- if (rainbow > 1.f)
- rainbow = 0;
- Color color = Color::FromHSB(rainbow, 1.f, 1.f);
- g_pSurface->FilledRect(_pos.x, _pos.y, _width, _height, Color(24, 24, 24, MenuAlpha_Main));
- //g_pSurface->FilledRect(_pos.x, _pos.y, _width, 4, Color(177, 5, 186, MenuAlpha_Main));
- GradientH(_pos.x, _pos.y, _width, 4, Color(220, 150, 0, MenuAlpha_Main), Color(250, 190, 0, MenuAlpha_Main));
- g_pSurface->OutlinedRect(_pos.x, _pos.y, _width, _height, Color(45, 45, 45, MenuAlpha_Main));
- //g_pSurface->FilledRect(_pos.x, _pos.y - 38, 61, 40, Color(24, 24, 24, MenuAlpha_Main));
- //g_pSurface->OutlinedRect(_pos.x + 1, _pos.y - 38, 60, 40, Color(177, 5, 186, MenuAlpha_Main));*/
- if (!menuOpened)
- return;
- //g_pSurface->OutlinedRect(_pos.x - 40, _pos.y + 5, _widthbggang, _heightbggang, Color(60, 60, 60, MenuAlpha_Main));
- //g_pSurface->OutlinedRect(_pos.x - 5, _pos.y - 5, _width + 2, _height - 10, Color(255, 1, 1));
- //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));
- //g_pSurface->FilledRect(_pos1.x - 0, _pos1.y - 0, _width + 10, _height + 28, Color(55, 55, 55, MenuAlpha_Main));
- g_pSurface->FilledRect(_pos.x - 5, _pos.y + 300, _width1 + 10, _height1, Color(44, 44, 44, MenuAlpha_Main));
- g_pSurface->FilledRect(_pos.x - 5, _pos.y - 5, _width + 10, _height + 28, Color(55, 55, 55, MenuAlpha_Main));
- g_pSurface->OutlinedRect(_pos.x - 4, _pos.y - 5, _width + 10, _height + 28, Color(0, 0, 0));
- //entire window
- g_pSurface->FilledRect(_pos.x, _pos.y, _width, _height, Color(24, 24, 24, MenuAlpha_Main));
- g_pSurface->OutlinedRect(_pos.x - 1, _pos.y - 1, _width + 2, _height + 2, Color(0, 0, 0));
- // bottom text
- g_pSurface->DrawT(_pos.x + 4, _pos.y + _height + 3, Color(180, 180, 180), Globals::WTFont, false, "slowness.cc recode #1 free hvh cheat");
- g_pSurface->OutlinedRect(_pos.x + 9, _pos.y + 5, _widthtabs, _heightabs, Color(60, 60, 60, MenuAlpha_Main));
- g_pSurface->FilledRect(_pos.x + 13, _pos.y + 40, _width - 26, _height - 48, Color(43, 43, 43, MenuAlpha_Main));
- g_pSurface->OutlinedRect(_pos.x + 13, _pos.y + 40, _width - 26, _height - 48, Color(0, 0, 0));
- /* int in_sizew = _width - 150;
- static int tab_selected = 0;
- static const int tab_amountlegit = 6;
- static std::string tab_names[tab_amountlegit] = { "rage","antiaim","legit","visuals","misc", "skins" };
- for (int i = 0; i < tab_amountlegit; i++)
- {
- RECT text_size = g_pSurface->GetTextSizeRect(Globals::CourierNew, tab_names[i].c_str());
- int tab_area[4] = { _pos.x + 150 + (i * 65) , _pos.y - 0 , 70, 20 };
- // int tab_area[4] = { _pos.x + 150 + (i * 70) , _pos.y - 0 , 70, 20 };
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(tab_area[0], tab_area[1], tab_area[2],
- tab_area[3]))
- tab_selected = i;
- if (tab_selected == i)
- {
- //g_pSurface->FilledRect(tab_area[0] - 1, tab_area[1] - 3, tab_area[2] + 2, tab_area[3], Color(177, 5, 186, MenuAlpha_Main));
- g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(24, 24, 24, MenuAlpha_Main));
- g_pSurface->DrawT(tab_area[0], tab_area[1], Color(143, 143, 143, MenuAlpha_Text), Globals::TabFont, false, tab_names[i].c_str());
- }
- else
- {
- g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(24, 24, 24, MenuAlpha_Main));
- g_pSurface->DrawT(tab_area[0], tab_area[1], Color(143, 143, 143, MenuAlpha_Text), Globals::TabFont, false, tab_names[i].c_str());
- }
- }*/
- int in_sizew = _width - 1;
- static int tab_selected = 0;
- static const int tab_amount = 6;
- static std::string tab_names[tab_amount] = { "A", "F", "G", "C", "D", "E" };
- static std::string tab_names2[tab_amount] = { "RAGEBOT", "ANTIAIM", "LEGIT", "VISUALS", "MISC", "SKINS" };
- for (int i = 0; i < tab_amount; i++)
- {
- RECT text_size = g_pSurface->GetTextSizeRect(Globals::menu_font, tab_names[i].c_str());
- int tab_area[4] = { _pos.x + 100 + (i * (in_sizew / tab_amount)), _pos.y - 57, (in_sizew / tab_amount), 20 };
- // int tab_area[4] = { _pos.x + 250 + (i * (in_sizew / tab_amount)), _pos.y + 400, (in_sizew / tab_amount), 20 };
- int tab_area2[4] = { _pos.x + 20 + (i * (in_sizew / tab_amount)), _pos.y + 10, (in_sizew / tab_amount), 20 };
- tab_area[1] = tab_area[1] - 5;
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(tab_area[0], tab_area[1], tab_area[2],
- tab_area[3]))
- tab_selected = i;
- if (tab_selected == i)
- {
- /*
- g_pSurface->FilledRect(tab_area[0], tab_area[1], 1, tab_area[3], Color(40, 44, 53, 255));
- g_pSurface->FilledRect(tab_area[0] + tab_area[2], tab_area[1], 1, tab_area[3], Color(40, 44, 53, 255));
- g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], 1, Color(40, 44, 53, 255));
- */
- //g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(37, 37, 45, MenuAlpha_Main));
- // 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));
- // 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));
- //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());
- g_pSurface->DrawT(tab_area2[0], tab_area2[1], Color(255, 255, 255, MenuAlpha_Text), Globals::WeaponIcon3, false, tab_names2[i].c_str());
- }
- else
- {
- //g_pSurface->FilledRect(tab_area[0], tab_area[1], tab_area[2], tab_area[3], Color(33, 33, 35, MenuAlpha_Main));
- //g_pSurface->FilledRect(tab_area[0] + 3, tab_area[1] + tab_area[3], tab_area[2] - 6, 2, Color(60, 60, 60, MenuAlpha_Main));
- //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));
- //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());
- g_pSurface->DrawT(tab_area[0], tab_area[1], Color(255, 255, 255, MenuAlpha_Text), Globals::menu_font, false, tab_names[i].c_str());
- }
- //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));
- }
- static int aimbot_main_subtab = 0;
- std::string pitch[6] = { "Disabled", "Down", "Up", "Origin", "Offset", "Fake Down" };
- std::string BodyAimOptions[5] = { "In Air", "Slowwalk", "Inaccuracy", "Vulnerable", "Lethal" };
- std::string AutoStopOptions[4] = { "Minimum", "Full Stop", "Custom" };
- std::string AutoStops[3] = { "Moving", "Standing", "Air" };
- std::string AutoStopOptions2[6] = { "Auto", "Scout", "AWP", "H.Pistol", "Pistol", "Other" };
- std::string jebne[2] = { "kokot", "kurwa" };
- std::string BodyAimModeOptions[2] = { "Prefer", "Force" };
- std::string Hitboxes[6] = { "Head", "Neck", "Arms", "Pelvis", "Stomach", "Legs" };
- // EVERY STRING BELOW HERE IS NEW
- std::string resolver[4] = { "Onetap", "Fatality", "Experimental", "Bruteforce" };
- std::string hcty[3] = { "Off", "Hitchance", "Spread Limit" };
- std::string desync2[2] = { "none", "Static" };
- std::string fltype[3] = { "Always", "Dynamic", "Switch" };
- std::string freestand_mode2[3] = { "Threat", "Highest Damage", "Highest Hitchance" };
- std::string test3[2] = { "Accuarcy boost", "Extended Backtrack" };
- if (c_config::get().esppreview)
- {
- static int spec_x;
- static int spec_y;
- int pos_x = spec_x;
- int pos_y = spec_y;
- static int _drag_x = 300;
- static int _drag_y = 300;
- static bool _dragging = false;
- bool _click = false;
- if (GetAsyncKeyState(VK_LBUTTON))
- _click = true;
- Vector2D _mouse_pos = g_pSurface->GetMousePosition();
- if (_dragging && !_click)
- _dragging = false;
- if (_dragging && _click)
- {
- pos_x = _mouse_pos.x - _drag_x;
- pos_y = _mouse_pos.y - _drag_y;
- spec_x = pos_x;
- spec_y = pos_y;
- }
- int spec_width = 280;
- int spec_height = 500;
- if ((g_pSurface->MouseInRegion(pos_x + 400, pos_y, spec_width, spec_height - 140))) {
- _dragging = true;
- _drag_x = _mouse_pos.x - pos_x;
- _drag_y = _mouse_pos.y - pos_y;
- }
- int wa, ha;
- g_pEngine->GetScreenSize(wa, ha);
- static double rainbow;
- rainbow += 0.001;
- if (rainbow > 1.f)
- rainbow = 0;
- Color color = Color::FromHSB(rainbow, 1.f, 1.f);
- static double rainbow1;
- rainbow1 += 0.001;
- if (rainbow1 > 1.f)
- rainbow1 = 0;
- g_pSurface->FilledRect(pos_x + 400, pos_y, spec_width, 20, Color(24, 24, 24));
- char loop_str[24];
- sprintf_s(loop_str, "Visual Preview");
- g_pSurface->DrawT(pos_x + 450, pos_y + 3, Color(180, 180, 180), Globals::SmallText, false, loop_str);
- // g_pSurface->OutlinedRect(pos_x + 200, pos_y + 1, 100, 5, Color(255, 255, 255));
- //g_pSurface->OutlinedRect(pos_x + 13, pos_y + 40, 50 - 26, 300 - 48, Color(255, 255, 255));
- g_pSurface->FilledRect(pos_x + 400, pos_y + 23, spec_width, 20, Color(24, 24, 24));
- // g_pSurface->DrawT(pos_x + 408, pos_y + 26, Color(180, 180, 180), Globals::SmallText, false, "[holding] slowwalk");
- g_pSurface->FilledRect(pos_x + 400, pos_y + 43, spec_width, 20, Color(24, 24, 24));
- g_pSurface->FilledRect(pos_x + 400, pos_y + 63, spec_width, 20, Color(24, 24, 24));
- g_pSurface->FilledRect(pos_x + 400, pos_y + 83, spec_width, 20, Color(24, 24, 24));
- g_pSurface->FilledRect(pos_x + 400, pos_y + 103, spec_width, 20, Color(24, 24, 24));
- g_pSurface->FilledRect(pos_x + 400, pos_y + 123, spec_width, 20, Color(24, 24, 24));
- g_pSurface->FilledRect(pos_x + 400, pos_y + 143, spec_width, 20, Color(24, 24, 24));
- g_pSurface->FilledRect(pos_x + 400, pos_y + 163, spec_width, 20, Color(24, 24, 24));
- g_pSurface->FilledRect(pos_x + 400, pos_y + 183, spec_width, 20, Color(24, 24, 24));
- g_pSurface->FilledRect(pos_x + 400, pos_y + 203, spec_width, 20, Color(24, 24, 24));
- g_pSurface->FilledRect(pos_x + 400, pos_y + 223, spec_width, 20, Color(24, 24, 24));
- g_pSurface->FilledRect(pos_x + 400, pos_y + 243, spec_width, 20, Color(24, 24, 24));
- g_pSurface->FilledRect(pos_x + 400, pos_y + 263, spec_width, 20, Color(24, 24, 24));
- g_pSurface->FilledRect(pos_x + 400, pos_y + 283, spec_width, 20, Color(24, 24, 24));
- g_pSurface->FilledRect(pos_x + 400, pos_y + 303, spec_width, 20, Color(24, 24, 24));
- g_pSurface->FilledRect(pos_x + 400, pos_y + 323, spec_width, 20, Color(24, 24, 24));
- g_pSurface->FilledRect(pos_x + 400, pos_y + 343, spec_width, 20, Color(24, 24, 24));
- g_pSurface->FilledRect(pos_x + 400, pos_y + 363, spec_width, 20, Color(24, 24, 24));
- g_pSurface->FilledRect(pos_x + 400, pos_y + 383, spec_width, 20, Color(24, 24, 24));
- if (c_config::get().box_enemies)
- {
- g_pSurface->OutlinedRect(pos_x + 450, pos_y + 55, 150, 300, Color(180, 180, 180));
- }
- if (c_config::get().name_enemies)
- {
- char loop_str[24];
- sprintf_s(loop_str, "COLLAPSE");
- g_pSurface->DrawT(pos_x + 495, pos_y + 35, Color(180, 180, 180), Globals::WTFont, false, loop_str);
- }
- if (c_config::get().ammo_enemy)
- {
- g_pSurface->FilledRect(pos_x + 450, pos_y + 360, 150, 3, Color(81, 140, 201));
- }
- if (c_config::get().health_enemies == 1)
- {
- g_pSurface->FilledRect(pos_x + 442, pos_y + 55, 3, 300, Color(127, 255, 0));
- }
- if (c_config::get().flaags[0])
- {
- char loop_str[24];
- sprintf_s(loop_str, "16000$");
- g_pSurface->DrawT(pos_x + 600, pos_y + 55, Color(115, 180, 25), Globals::WeaponESP, false, loop_str);
- }
- if (c_config::get().flaags[1])
- {
- char loop_str[24];
- sprintf_s(loop_str, "HK");
- g_pSurface->DrawT(pos_x + 600, pos_y + 65, Color(150, 150, 150), Globals::WeaponESP, false, loop_str);
- }
- 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));
- //GradientV(_pos.x, _pos.y - 1, _width, 2, Color(220, 150, 80, MenuAlpha_Main), Color(250, 190, 0, MenuAlpha_Main));
- 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));
- if (c_config::get().flaags[2])
- {
- char loop_str[24];
- sprintf_s(loop_str, "ZOOM");
- g_pSurface->DrawT(pos_x + 600, pos_y + 75, Color(53, 166, 208), Globals::WeaponESP, false, loop_str);
- }
- if (c_config::get().weapon_enemies && c_config::get().show_icon_when_possible_enemies)
- {
- char loop_str[24];
- sprintf_s(loop_str, "O");
- g_pSurface->DrawT(pos_x + 500, pos_y + 370, Color(53, 166, 208), Globals::WeaponIcon, false, loop_str);
- }
- }
- if (tab_selected == 0)
- {
- groupbox(35, 50, GroupBoxSize_Width, GroupBoxSize_Height + 363, "text");
- checkbox("Enabled", &c_config::get().aimbot_enabled);
- combobox(3, "Target selection", freestand_mode2, &c_config::get().antiaim_freestanding_mod2e);
- combobox(3, "Hitchance Type", hcty, &c_config::get().hcty);
- slider(150, "Zeus Range", &c_config::get().zeus_range, "M", 1);
- checkbox("Automatic Fire", &c_config::get().auto_scope2);
- checkbox("Automatic Penetration", &c_config::get().auto_scope3);
- checkbox("Automatic Revolver", &c_config::get().autorevolver);
- checkbox("Silent Aim", &c_config::get().hide_shot);
- checkbox("Override awp", &c_config::get().overrideawp);
- combobox(6, "Weapons ", AutoStopOptions2, &c_config::get().mode);
- std::string HitScam[8] = { "Head", "Pelvis", "Thorax", "L.Chest", "U.Chest", "Foot", "Arm", "Thigm" };
- if (c_config::get().mode == 0)
- {
- slider(100, "Minimum Hitchance", &c_config::get().auto_hitchance, "%", 1);
- slider(100, "Minimum Damage", &c_config::get().auto_mindamage, "HP", 1);
- MultiComboBox(8, "Hitscan", HitScam, c_config::get().rage_hitscan_hitboxes);
- slider(100, "Head Scale (Auto)", &c_config::get().auto_headscale, "%", 1);
- slider(100, "Body Scale (Auto)", &c_config::get().auto_bodyscale, "%", 1);
- }
- if (c_config::get().mode == 1)
- {
- slider(100, "Minimum Hitchance", &c_config::get().scout_hitchance, "%", 1);
- slider(100, "Minimum Damage", &c_config::get().scout_mindamage, "HP", 1);
- MultiComboBox(8, "Hitscan", HitScam, c_config::get().rage_hitscan_hitboxes);
- slider(100, "Head Scale (Scout)", &c_config::get().scout_headscale, "%", 1);
- slider(100, "Body Scale (Scout)", &c_config::get().scout_bodyscale, "%", 1);
- }
- if (c_config::get().mode == 2)
- {
- slider(100, "Minimum Hitchance", &c_config::get().awp_hitchance, "%", 1);
- slider(100, "Minimum Damage", &c_config::get().awp_mindamage, "HP", 1);
- MultiComboBox(8, "Hitscan", HitScam, c_config::get().rage_hitscan_hitboxes);
- slider(100, "Head Scale (AWP)", &c_config::get().awp_headscale, "%", 1);
- slider(100, "Body Scale (AWP)", &c_config::get().awp_bodyscale, "%", 1);
- }
- if (c_config::get().mode == 3)
- {
- slider(100, "Minimum Hitchance", &c_config::get().heavy_pistol_hitchance, "%", 1);
- slider(100, "Minimum Damage", &c_config::get().heavy_pistol_mindamage, "HP", 1);
- MultiComboBox(8, "Hitscan", HitScam, c_config::get().rage_hitscan_hitboxes);
- slider(100, "Head Scale (H. Pistol)", &c_config::get().hpistol_headscale, "%", 1);
- slider(100, "Body Scale (H. Pistol)", &c_config::get().hpistol_bodyscale, "%", 1);
- }
- if (c_config::get().mode == 4)
- {
- slider(100, "Minimum Hitchance", &c_config::get().pistol_hitchance, "%", 1);
- slider(100, "Minimum Damage", &c_config::get().pistol_mindamage, "HP", 1);
- MultiComboBox(8, "Hitscan", HitScam, c_config::get().rage_hitscan_hitboxes);
- slider(100, "Head Scale (Pistol)", &c_config::get().pistol_headscale, "%", 1);
- slider(100, "Body Scale (Pistol)", &c_config::get().pistol_bodyscale, "%", 1);
- }
- if (c_config::get().mode == 5)
- {
- slider(100, "Minimum Hitchance", &c_config::get().other_hitchance, "%", 1);
- slider(100, "Minimum Damage", &c_config::get().other_mindamage, "HP", 1);
- MultiComboBox(8, "Hitscan", HitScam, c_config::get().rage_hitscan_hitboxes);
- slider(100, "Head Scale (Other)", &c_config::get().other_headscale, "%", 1);
- slider(100, "Body Scale (Other)", &c_config::get().other_bodyscale, "%", 1);
- }
- static int current_subtab_selection_accuracy = 0;
- groupbox(365, 50, GroupBoxSize_Width, GroupBoxSize_Height + 363, "test");
- std::string bt[2] = { "Head", "Neck" };
- checkbox("Remove recoil", &c_config::get().aimbot_norecoil);
- checkbox("Fakelag prediction", &c_config::get().fakelag_prediction);
- checkbox("Resolver", &c_config::get().aimbot_resolver);
- //checkbox("Pitch Resolver", &c_config::get().pitchresolver);
- checkbox("Accuracy Boost", &c_config::get().back_boost);
- if (c_config::get().back_boost) {
- checkbox("Extended Backtracking", &c_config::get().extendedbacktrack);
- }
- MultiComboBox(2, "Backtrack Hitbox", bt, c_config::get().BacktrackHitbox);
- checkbox("Auto Stop", &c_config::get().autostop);
- combobox(3, "Auto Stop Mode", AutoStopOptions, &c_config::get().autostop_mode);
- if (c_config::get().autostop_mode == 2)
- {
- slider(100, "Custom Auto Stop Speed", &c_config::get().customautostop, "", 1);
- }
- MultiComboBox(5, "Body Aim If", BodyAimOptions, c_config::get().prefer_bodyaim);
- //combobox(2, "Body Aim Mode", BodyAimModeOptions, &c_config::get().bodyaim_mode);
- slider(20, "Body Aim after X Miss", &c_config::get().missed_shoots, "", 1);
- slider(120, "Body Aim if HP Lower Than", &c_config::get().hp, "HP", 1);
- EmptySpace("Body Aim Key");
- keybind(&c_config::get().baim_bind, "Force Body Aim Key");
- }
- else if (tab_selected == 1)
- {
- groupbox(35, 50, GroupBoxSize_Width, GroupBoxSize_Height + 363, "test");
- std::string pitch[6] = { "Disabled", "Down", "Up", "Origin", "Offset", "Fake Down" };
- std::string yaw[6] = { "Disabled", "Backwards", "Origin", "Spin", "Manual", "Backward Jitter" };
- std::string lbyb[3] = { "One Flick", "Two Flicks", "Relative" };
- std::string on_shot[2] = { "Normal", "Turbobooster" };
- std::string freestanding[3] = { "off", "normal", "desync" };
- std::string desync[6] = { "Disabled", "Static(broken)", "Fake Angles", "Jitter", "Tank(broken)", "test" };
- std::string DesyncType[5] = { "Disabled", "Still", "Stretch", "Fake Jitter", "Autism" };
- std::string freestand_mode[3] = { "Threat", "Closest to Crosshair", "Closest Distance" };
- std::string pitch_make[4] = { "off", "down", "up", "zero" };
- std::string real_make[4] = { "off", "static", "jitter" };
- std::string fake_make[5] = { "off", "static", "alternative static", "58 delta", "Jitter NEw" };
- combobox(4, "Pitch", pitch_make, &c_config::get().pitch_make);
- combobox(3, "Real", real_make, &c_config::get().real_make);
- if (c_config::get().real_make == 2)
- slider(180, "Jitter Range", &c_config::get().real_jitter, "", 1);
- checkbox("Freestand Real", &c_config::get().antiaim_freestanding);
- // checkbox("stabilize fakelag", &c_config::get().stabilize_fakelag);
- combobox(4, "Fake", fake_make, &c_config::get().fake_make);
- checkbox("Anti-Aim Reverse Breaking", &c_config::get().aareversebreaking);
- checkbox("Crimsync", &c_config::get().crimsync);
- if (c_config::get().fake_make == 1)
- {
- checkbox("Invert(makes your aa jitter)", &c_config::get().invert);
- keybind(&c_config::get().desync_switch_bind, "");
- slider(60, "Max Fake Delta", &c_config::get().max_fake_delta, "", 1);
- }
- else if (c_config::get().fake_make == 2)
- {
- checkbox("Invert(makes your aa jitter)", &c_config::get().invert);
- keybind(&c_config::get().desync_switch_bind, "");
- slider(100, "Body Lean", &c_config::get().b_lean, "", 1);
- if (c_config::get().invert)
- slider(100, "Inverted Body Lean", &c_config::get().in_b_lean, "", 1);
- }
- else if (c_config::get().fake_make == 3)
- {
- checkbox("Invert(makes your aa jitter)", &c_config::get().invert);
- keybind(&c_config::get().desync_switch_bind, "");
- slider(180, "Body Lean", &c_config::get().b_lean, "", 1);
- if (c_config::get().invert)
- slider(100, "Inverted Body Lean", &c_config::get().in_b_lean, "", 1);
- }
- EmptySpace("");
- EmptySpace("");
- groupbox(365, 50, GroupBoxSize_Width, GroupBoxSize_Height + 70, "test");
- checkbox("Enable Fakelag", &c_config::get().enable_fakelag);
- std::string fakelag_mode[3] = { "Normalized", "Factor", "Adaptive" };
- combobox(3, "Mode", fakelag_mode, &c_config::get().fakelag_mode);
- if (c_config::get().fakelag_mode == 0 || c_config::get().fakelag_mode == 1 || c_config::get().fakelag_mode == 2)
- {
- slider(14, "Standing value", &c_config::get().stand_fakelag_value, "", 1);
- slider(14, "Moving value", &c_config::get().move_fakelag_value, "", 1);
- slider(14, "Air value", &c_config::get().air_fakelag_value, "", 1);
- }
- //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);
- //checkbox("Fake-lag visualisation", &c_config::get().fakechams);
- groupbox(365, 335, GroupBoxSize_Width, GroupBoxSize_Height + 50, "test");
- slider(100, "Slow Walk", &c_config::get().slowwalk_speed, "%", 1);
- checkbox("Fix Leg Movement", &c_config::get().fixleg);
- checkbox("Infinite duck", &c_config::get().misc_fastcrouch);
- checkbox("On Shot Anti-Aim", &c_config::get().on_shot_aa);
- button(SkinTrolling, "Skin Trolling");
- }
- else if (tab_selected == 2) {
- std::string legitaa[1] = { "Static" };
- groupbox(35, 50, GroupBoxSize_Width, GroupBoxSize_Height + 363, "test");
- EmptySpace("");
- checkbox("Enabled", &c_config::get().legit_aimbot_enabled);
- checkbox("Backtrack", &c_config::get().legit_aimbot_backtrack);
- slider(180, "FOV", &c_config::get().legit_aimbot_fov, "", 1);
- slider(100, "Smooth", &c_config::get().linear_progression_threshold, "", 1);
- checkbox("Recoil Compensation", &c_config::get().rcs);
- EmptySpace("");
- slider(100, "Rcs", &c_config::get().RCSamount, "", 1);
- groupbox(365, 50, GroupBoxSize_Width, GroupBoxSize_Height + 70, "test");
- groupbox(365, 335, GroupBoxSize_Width, GroupBoxSize_Height + 50, "test");
- checkbox("Enable Legit Anti-Aim", &c_config::get().enablelegitaa);
- //slider(180, "additive", &c_config::get().additive, "*", 1);
- }
- else if (tab_selected == 3)
- {
- static int current_players_esp_subtab = 0;
- std::string WireFrameHands[3] = { "Disabled", "Invisible", "Chams" };
- std::string EventLogsOptions[7] = { "purchases", "hurts", "kills", "spread miss", "occlusion miss", "resolver miss", "extended info" };
- std::string skel[2] = { "Normal", "Backtrack" };
- std::string Health_Type[3] = { "Disabled", "Normal", "Battery" };
- std::string Hitmarker_Type[6] = { "Disabled", "Metallic", "Bubble", "Fatality", "Bameware", "Call Of Duty" };
- std::string flags[4] = { "Money ($)", "Armor (HK/K)", "Zoom (ZOOM)", "Fakeduck (FAKEDUCK)" };
- std::string indicators[5] = { "Choke", "Fake", "Lag Compensation", "Onetap old", "onetap v1" };
- std::string removals[5] = { "Remove Visual Recoil Overlay", "Remove Scope Overlay", "Remove Postprocessing", "Remove Smoke", "Remove Flash" };
- groupbox(35, 50, GroupBoxSize_Width, GroupBoxSize_Height + 363, "test");
- static int current_subtab_selection_esp = 0;
- DrawESPSP_Subtab(current_subtab_selection_esp, 3, _pos, MenuAlpha_Main);
- std::string gunmodel[5] = { "Flat", "Material", "Wireframe" ,"Pulse", "Eso" };
- switch (current_subtab_selection_esp)
- {
- case 0:
- {
- EmptySpace("");
- EmptySpace("");
- checkbox("Enabled", &c_config::get().visuals_enabled);
- color_selector("box_col", &c_config::get().box_esp_color_r, &c_config::get().box_esp_color_g,
- &c_config::get().box_esp_color_b, &c_config::get().box_esp_color_a);
- checkbox("Bounding Box", &c_config::get().box_enemies);
- color_selector("name_col", &c_config::get().name_esp_color_r, &c_config::get().name_esp_color_g,
- &c_config::get().name_esp_color_b, &c_config::get().name_esp_color_a);
- combobox(3, "Health", Health_Type, &c_config::get().health_enemies);
- checkbox("Name", &c_config::get().name_enemies);
- color_selector("weapon_col", &c_config::get().weapon_esp_color_r, &c_config::get().weapon_esp_color_g,
- &c_config::get().weapon_esp_color_b, &c_config::get().weapon_esp_color_a);
- checkbox("Weapon", &c_config::get().weapon_enemies);
- if (c_config::get().weapon_enemies)
- {
- checkbox("Weapon Icons", &c_config::get().show_icon_when_possible_enemies);
- }
- checkbox("Ammo", &c_config::get().ammo_enemy); // made by random guy
- checkbox("Enable flags", &c_config::get().flags_enemy);
- if (c_config::get().flags_enemy)
- {
- MultiComboBox(4, "Flags Type", flags, c_config::get().flaags);
- }
- std::string glow_mode[3] = { "default", "pulse", "outline" };
- color_selector("skel_col", &c_config::get().skel_color_r, &c_config::get().skel_color_g,
- &c_config::get().skel_color_b, &c_config::get().skel_color_a);
- MultiComboBox(2, "Draw Skeleton", skel, c_config::get().skeleton);
- color_selector("bta_col", &c_config::get().bta_color_r, &c_config::get().bta_color_g,
- &c_config::get().bta_color_b, &c_config::get().bta_color_a);
- checkbox("Backtrack Chams", &c_config::get().btchams2);
- color_selector("glow_col", &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);
- checkbox("Glow", &c_config::get().glow_enemies);
- if (c_config::get().glow_enemies)
- combobox(3, "type", glow_mode, &c_config::get().glow_mode);
- color_selector("hitbox_col", &c_config::get().hitbox_color_r,
- &c_config::get().hitbox_color_g, &c_config::get().hitbox_color_b,
- &c_config::get().hitbox_color_a);
- checkbox("Draw Hitted Hitboxes", &c_config::get().drawhtbx);
- slider(10, "Hitboxes duration", &c_config::get().htbxdur, "s", 1);
- break;
- }
- case 1:
- {
- EmptySpace("");
- std::string WireFrameHands[6] = { "Disabled", "Flat", "Material", "Metallic" , "Invisible", "Pulsing" };
- std::string LocalChams[8] = { "Disabled", "Flat", "Material", "Metallic", "Invisible", "Pulsing", "Eso", "Rifk" };
- std::string LocalChamsFake[5] = { "Disabled", "Flat","Material", "Metallic", "Pulsing" };
- std::string ChamsTypes[6] = { "Disabled", "Flat", "Material", "Pulsing", "Eso", "Rifk"};
- std::string glow_mode_local[3] = { "default", "pulse", "outline" };
- std::string glow_mode[3] = { "default", "pulse", "outline" };
- color_selector("local_glow_col", &c_config::get().local_glow_color_r, &c_config::get().local_glow_color_g,
- &c_config::get().local_glow_color_b, &c_config::get().local_glow_color_a);
- checkbox("Local Glow", &c_config::get().glow_local);
- if (c_config::get().glow_local)
- combobox(3, "type", glow_mode_local, &c_config::get().glow_mode_local);
- color_selector("chams_col", &c_config::get().chams_esp_color_r, &c_config::get().chams_esp_color_g,
- &c_config::get().chams_esp_color_b, &c_config::get().chams_esp_color_a);
- combobox(5, "Chams Enemy", ChamsTypes, &c_config::get().chams_enemies);
- 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);
- checkbox("Enemy XQZ", &c_config::get().chams_xqz_enemies);
- if (c_config::get().chams_enemies == 1 || c_config::get().chams_enemies == 2)
- checkbox("Enemy Chams Wireframe", &c_config::get().chams_enemies_wireframe);
- 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);
- checkbox("glow", &c_config::get().glow_enemies);
- if (c_config::get().glow_enemies)
- combobox(3, "type", glow_mode, &c_config::get().glow_mode);
- 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);
- combobox(8, "Local Chams", LocalChams, &c_config::get().local_chams);
- if (c_config::get().local_chams == 1 || c_config::get().local_chams == 2)
- checkbox("Local Chams Wireframe", &c_config::get().chams_local_wireframe);
- color_selector("hand_cham_color", &c_config::get().hand_chams_color_r, &c_config::get().hand_chams_color_g,
- &c_config::get().hand_chams_color_b, &c_config::get().hand_chams_color_a);
- checkbox("Hand Chams", &c_config::get().handchams);
- combobox(6, "Models(Hand Chams)", gunmodel, &c_config::get().hand_chams);
- color_selector("gun_cham_color", &c_config::get().gun_chams_color_r, &c_config::get().gun_chams_color_g,
- &c_config::get().gun_chams_color_b, &c_config::get().gun_chams_color_a);
- checkbox("Two way Hand chams", &c_config::get().gunchams);
- combobox(6, "Models (hand Chams)", gunmodel, &c_config::get().modelgun);
- color_selector("desync_color", &c_config::get().desync_chams_color_r, &c_config::get().desync_chams_color_g,
- &c_config::get().desync_chams_color_b, &c_config::get().desync_chams_color_a);
- checkbox("desync Chams", &c_config::get().desync_chams);
- MultiComboBox(5, "Indicators", indicators, c_config::get().indicators);
- break;
- }
- case 2:
- {
- EmptySpace("");
- EmptySpace("");
- checkbox("Spectator List", &c_config::get().visual_spectator_list);
- checkbox("Ragdoll Launchers", &c_config::get().ragdoll_launcher);
- checkbox("kill animation", &c_config::get().ezkillcount);
- checkbox("Keybinds", &c_config::get().keysindicators);
- checkbox("esp preview", &c_config::get().esppreview);
- color_selector("player_indicator_col", &c_config::get().fov_arrows_esp_color_r,
- &c_config::get().fov_arrows_esp_color_g, &c_config::get().fov_arrows_esp_color_b,
- &c_config::get().fov_arrows_esp_color_a);
- checkbox("Out of FOV arrow", &c_config::get().fov_arrows_enemy);
- if (c_config::get().fov_arrows_enemy)
- {
- slider(30, "Size", &c_config::get().fov_arrows_enemy_size, "px", 1);
- slider(100, "Distance", &c_config::get().fov_arrows_enemy_distance, "%", 1);
- checkbox("Always indicate", &c_config::get().fov_arrows_always_indicate);
- }
- checkbox("Custom Viewmodel", &c_config::get().customviewmodel);
- if (c_config::get().customviewmodel) {
- slider(20, "Viewmodel X", &c_config::get().ViewmodelX, "%", 1);
- slider(20, "Viewmodel Y", &c_config::get().ViewmodelY, "%", 1);
- slider(20, "Viewmodel Z", &c_config::get().ViewmodelZ, "%", 1);
- }
- break;
- }
- }
- // 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);
- // checkbox("Backtrack Chams", &c_config::get().btchams);
- groupbox(365, 50, GroupBoxSize_Width, GroupBoxSize_Height + 273, "test");
- static int current_subtab_selection_second = 0;
- DrawESPSECS_Subtab(current_subtab_selection_second, 2, _pos, MenuAlpha_Main);
- switch (current_subtab_selection_second)
- {
- case 0:
- {
- EmptySpace("");
- EmptySpace("");
- color_selector("bullet_tracer_color", &c_config::get().bullet_tracers_color_r, &c_config::get().bullet_tracers_color_g,
- &c_config::get().bullet_tracers_color_b, &c_config::get().bullet_tracers_color_a);
- checkbox("Bullet Tracers", &c_config::get().visuals_bullet_tracers);
- if (c_config::get().visuals_bullet_tracers) {
- color_selector("bullet_enemy_tracer_color", &c_config::get().bullet_enemy_tracers_color_r, &c_config::get().bullet_enemy_tracers_color_g,
- &c_config::get().bullet_enemy_tracers_color_b, &c_config::get().bullet_enemy_tracers_color_a);
- checkbox("Enemy Bullet Tracers", &c_config::get().visuals_enemy_bullet_tracers);
- color_selector("bullet_team_tracer_color", &c_config::get().bullet_team_tracers_color_r, &c_config::get().bullet_team_tracers_color_g,
- &c_config::get().bullet_team_tracers_color_b, &c_config::get().bullet_team_tracers_color_a);
- checkbox("Team Bullet Tracers", &c_config::get().visuals_team_bullet_tracers);
- string Tracer_style[2] = { "Beam", "Laser" };
- slider(10, "Bullet Tracers Life", &c_config::get().bullet_tracer_life, " sec", 1);
- combobox(2, "Bullet Tracer Style", Tracer_style, &c_config::get().bullet_tracer_style);
- checkbox("Bullet Impacts", &c_config::get().impacts);
- }
- MultiComboBox(5, "Removals", removals, c_config::get().removals);
- if (c_config::get().removals[1])
- {
- checkbox("Display spread with scope", &c_config::get().dynamic_scope);
- }
- checkbox("Nightmode", &c_config::get().nightmode);
- checkbox("Fullbright", &c_config::get().fullbright);
- checkbox("Transparent Props", &c_config::get().transparent_props);
- checkbox("Bomb Timer", &c_config::get().bombtimer);
- break;
- }
- case 1:
- {
- EmptySpace("");
- EmptySpace("");
- checkbox("Hit Marker", &c_config::get().hitmarker);
- combobox(6, "Hit Marker Sound", Hitmarker_Type, &c_config::get().hitmarker_sound);
- checkbox("Force Crosshair Overlay", &c_config::get().force_crosshair);
- checkbox("Lefthanded Knife", &c_config::get().leftknife);
- checkbox("Penetration Crosshair Overlay", &c_config::get().penetration_crosshair);
- checkbox("Reveal On Radar", &c_config::get().visuals_radar);
- checkbox("Grenade Trajectory", &c_config::get().grenade_prediction);
- checkbox("Aspect Ratio Changer", &c_config::get().aspectchanger);
- slider(100, "Aspect Ratio", &c_config::get().aspectslide, "°", 1);
- slider(135, "Field Of View", &c_config::get().fov, "°", 1);
- checkbox("Retain FOV When Scoped", &c_config::get().fov_while_zoomed);
- slider(135, "Viewmodel Field Of View", &c_config::get().viewmodel_fov, "°", 1);
- EmptySpace("Thirdperson Key");
- keybind(&c_config::get().thirdperson_bind, "a");
- slider(135, "Thirdperson Distance", &c_config::get().thirdperson_distance, "°", 1);
- checkbox("Preserve Killfeed", &c_config::get().visual_preserve_killfeed);
- if (c_config::get().visual_preserve_killfeed) slider(300, "Killfeed Time", &c_config::get().killfeedtime, "s", 1);
- MultiComboBox(7, "Event Logger", EventLogsOptions, c_config::get().event_logger);
- checkbox("Disable Thirdperson on Nade", &c_config::get().disabletpnade);
- std::string nosmoke_type[3] = { "Disabled", "No Draw", "Wireframe" };
- break;
- }
- }
- }
- else if (tab_selected == 4)
- {
- groupbox(35, 50, GroupBoxSize_Width, GroupBoxSize_Height + 363, "test");
- EmptySpace("");
- checkbox("Bunnyhop", &c_config::get().misc_bhop);
- checkbox("Air Strafe", &c_config::get().misc_autostrafe);
- checkbox("Killsay", &c_config::get().killsay);
- checkbox("Clan tag", &c_config::get().clan);
- std::string clanlists[5] = { "None", "Slowness.cc", "Onetap.su", "Aimware.net", "Gamesense" };
- combobox(5, "Clantag type", clanlists, &c_config::get().clanlist);
- checkbox("Automatic Pistol", &c_config::get().autopistol);
- checkbox("Name Stealer", &c_config::get().namespam);
- checkbox("Buybot", &c_config::get().otbuybot);
- 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" };
- std::string second[4] = { "Disabled", "Dual Elites", "Revolver / Deagle", "Tec 9" };
- std::string add[4] = { "Kevlar", "Kevlar + Helmet", "Zeus x27", "Defuse Kit" };
- std::string grenades[5] = { "Incendiary/ Molotov", "Decoy", "Flashbang", "High Explosive", "Smoke" };
- combobox(17, "Primary", primary, &c_config::get().buybotlist);
- combobox(4, "Secondary", second, &c_config::get().bbsecond);
- MultiComboBox(5, "Grenades", grenades, c_config::get().greds);
- MultiComboBox(4, "Additional", add, c_config::get().adds);
- groupbox(365, 50, GroupBoxSize_Width, GroupBoxSize_Height + 363, "test");
- 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);
- EmptySpace("Accent color");
- 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);
- EmptySpace("Slider color");
- 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);
- EmptySpace("Slider color 2");
- checkbox("Anti-untrusted", &c_config::get().misc_antiuntrusted);
- // checkbox("Watermark", &c_config::get().watermark);
- std::string watermark[3] = { "Off", "V1", "V2"};
- combobox(3, "Watermark", watermark, &c_config::get().watermark2);
- std::string KeyBindList[4] = { "Slow Walk", "Swap Manual", "Fake Duck", "Air Stuck" };
- static int CurrentKeybind = 0;
- combobox(5, "Keybind", KeyBindList, &CurrentKeybind);
- static int gay23 = 0;
- switch (CurrentKeybind)
- {
- case 0: keybind(&c_config::get().slowwalk_bind, "b");
- break;
- case 1: keybind(&c_config::get().manual_swap_bind, "c");
- break;
- case 2: keybind(&c_config::get().fakeduck_bind, "d");
- break;
- case 3: keybind(&c_config::get().airstuck_bind, "e");
- }
- combobox(14, "Configuration", config_slots, &save_slot);
- button(Save_Config, "Save");
- button(Load_Config, "Load");
- }
- else if (tab_selected == 5)
- {
- std::string knife_options[15] = {
- "Default",
- "M9 Bayonet",
- "Bayonet",
- "Flip",
- "Gut",
- "Karambit",
- "Huntsman",
- "Falchion",
- "Bowie",
- "Butterfly",
- "Shadow Daggers",
- "Navaja",
- "Stiletto",
- "Ursus",
- "Talon"
- };
- std::string skin_list[17] = {
- "None",
- "Icarus Fell",
- "Crimson Web",
- "Tiger Tooth",
- "Bulldozer",
- "Boom",
- "Ultraviolet",
- "Death By Kitty",
- "Emerald",
- "Dragon King",
- "Doppler",
- "Monkey Business",
- "Sun In Leo",
- "Gamma Doppler",
- "Aloha",
- "White Out",
- "Dragon Lore"
- };
- std::string weapon_options[11] = {
- "Knife",
- "Scar20",
- "G3SG1",
- "SSG08",
- "AK47",
- "DUAL BERRETAS",
- "AWP",
- "DEAGLE",
- "REVOLVER",
- "CZ75",
- "GLOVES SKIN"
- };
- static int SelectedWeapon;
- if (SelectedWeapon == 0) {
- this->ListBox(5, 50, GroupBoxSize_Width / 1.5, (GroupBoxSize_Height * 2) + 5, 10, "Weapon", weapon_options, &SelectedWeapon);
- 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);
- 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);
- }
- else {
- this->ListBox(5, 50, GroupBoxSize_Width, (GroupBoxSize_Height * 2) + 5, 11, "Weapon", weapon_options, &SelectedWeapon);
- switch (SelectedWeapon) {
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- }
- }
- }
- }
- void Menu::DoPlayerList(int x, int y, int w, int h) {
- g_pSurface->FilledRect(_pos.x + x, _pos.y + y, w, h, Color(25, 26, 33, MenuAlpha_Main));
- g_pSurface->OutlinedRect(_pos.x + x, _pos.y + y, w, h, Color(40, 44, 53, MenuAlpha_Main));
- g_pSurface->FilledRect(_pos.x + x + 1, _pos.y + y + 1, w - 2, 15, Color(31, 31, 38, MenuAlpha_Main));
- 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));
- g_pSurface->DrawT(_pos.x + x + (w / 2), _pos.y + y + 1, Color(143, 143, 143, MenuAlpha_Main), Globals::WTFont, true, "Players");
- if (g_pEngine->IsInGame() && g_pEngine->IsConnected()) {
- for (int i = 0; i < g_pGlobalVars->maxClients; i++) {
- auto Entity = g_pEntityList->GetClientEntity(i);
- if (!Globals::LocalPlayer || !Entity)
- continue;
- if (Entity->GetTeam() == Globals::LocalPlayer->GetTeam())
- continue;
- PlayerInfo_s EntityInfo;
- if (g_pEngine->GetPlayerInfo(i, &EntityInfo)) {
- auto SteamID = EntityInfo.iSteamID;
- PlayerList_Player[i] = SteamID;
- static int selected_player;
- RECT Area = { _pos.x + x, _pos.y + y + 17 + (16 * i), w, 15 };
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(Area.left, Area.top, Area.right, Area.bottom) && menuOpened) {
- selected_player = SteamID;
- }
- if (selected_player == SteamID) {
- g_pSurface->FilledRect(Area.left, Area.top, Area.right, Area.bottom, Color(28, 28, 35, MenuAlpha_Main));
- }
- else {
- g_pSurface->FilledRect(Area.left, Area.top, Area.right, Area.bottom, Color(21, 21, 28, MenuAlpha_Main));
- }
- g_pSurface->OutlinedRect(Area.left, Area.top, Area.right, Area.bottom, Color(40, 44, 53, MenuAlpha_Main));
- g_pSurface->DrawT(Area.left + (Area.right / 2), Area.top + 1, Color(143, 143, 143, MenuAlpha_Main), Globals::WTFont, true, EntityInfo.szName);
- }
- }
- }
- }
- void Menu::groupbox(int x, int y, int w, int h, std::string name, bool dont_draw, bool has_subtabs)
- {
- if (!dont_draw)
- {
- RECT text_size = g_pSurface->GetTextSizeRect(Globals::WTFont, name.c_str());
- // g_pSurface->OutlinedRect(_pos.x + x - 1, _pos.y + y - 1, w + 2, h + 2, Color(0, 0, 0, 185));
- g_pSurface->FilledRect(_pos.x + x, _pos.y + y, w, h, Color(24, 24, 24, MenuAlpha_Main));
- g_pSurface->OutlinedRect(_pos.x + x, _pos.y + y, w, h, Color(0, 0, 0));
- 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());
- // 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());
- auto a = _pos;
- }
- int ItemsToDraw = h / 24;
- Vector2D a = g_pSurface->GetMousePosition();
- // x left 2 right (im braindead)
- groupbox_top = _pos.y + y;
- if (has_subtabs)
- {
- y_offset = (_pos.y + (y + 34));
- }
- else
- {
- y_offset = (_pos.y + (y + 12));
- }
- x_offset = _pos.x + x;
- groupbox_bottom = (_pos.y + (y + h));
- groupbox_width = (_pos.x + (x + w));
- }
- void Menu::ScrollableGroupBox(int x, int y, int w, int h)
- {
- static bool pressed = false;
- static int add;
- if (GetAsyncKeyState(VK_DOWN) & 1)
- {
- add += 16;
- }
- if (GetAsyncKeyState(VK_UP) & 1)
- {
- add -= 16;
- }
- y_offset = y_offset + add;
- }
- void Watermark() {
- int w_s, h_s;
- int x, y, w, h;
- int w0, h0;
- g_pEngine->GetScreenSize(w_s, h_s);
- w = w_s / 2; h = h_s / 2;
- x = 5 + 5, y = 10, w = 197, h = 20;
- auto watermark = [](int x, int y, int w, int h, Color c) {
- g_pSurface->Line(x, y, x, y + h, c);
- g_pSurface->Line(x, y + h, x + w + 1, y + h, c);
- g_pSurface->Line(x + w, y, x + w, y + h, c);
- g_pSurface->Line(x, y, x + w, y, c);
- };
- static int u = 0;
- float watermarkScrollSpeed = 1.5f;
- g_pSurface->FilledRect(x, y, w, h, Color(11, 11, 11));
- watermark(x - 0, y - 0, w + 0 * 2, h + 0 * 2, Color(18, 18, 18));
- watermark(x - 1, y - 1, w + 1 * 2, h + 1 * 2, Color(53, 53, 53));
- watermark(x - 2, y - 2, w + 2 * 2, h + 2 * 2, Color(28, 28, 28));
- watermark(x - 3, y - 3, w + 3 * 2, h + 3 * 2, Color(28, 28, 28));
- watermark(x - 4, y - 4, w + 4 * 2, h + 4 * 2, Color(28, 28, 28));
- watermark(x - 5, y - 5, w + 5 * 2, h + 5 * 2, Color(53, 53, 53));
- watermark(x - 6, y - 6, w + 6 * 2, h + 6 * 2, Color(18, 18, 18));
- g_pSurface->DrawT(7 + 5, 14, Color(255, 255, 255, 255), Globals::WTFont, false, " money | by carterrr | ");
- g_pSurface->DrawT(153, 14, Color(255, 255, 255, 255), Globals::WTFont, false, "null");
- g_pSurface->DrawT(44 + 7, 14, Color(255, 255, 255, 255), Globals::WTFont, false, "sense");
- }
- void Menu::checkbox(std::string name, bool* item)
- {
- if (groupbox_bottom <= y_offset + 16)
- return;
- int size = 8;
- static bool pressed = false;
- RECT text_size = g_pSurface->GetTextSizeRect(Globals::WTFont, name.c_str());
- if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 6, y_offset, size + 17 + text_size.right,
- size) && !dont_recieve_input && menuOpened)
- {
- if (pressed)
- *item = !*item;
- pressed = false;
- }
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 6, y_offset, size + 17 + text_size.right,
- size) && !pressed)
- pressed = true;
- if (*item == true)
- {
- g_pSurface->FilledRect(x_offset + 6, y_offset, size, size,
- Color(c_config::get().menu_color_r, c_config::get().menu_color_g, c_config::get().menu_color_b,
- MenuAlpha_Main));
- g_pSurface->DrawT(x_offset + 20, y_offset - 3, Color(143, 143, 143, MenuAlpha_Main), Globals::WTFont, false,
- name.c_str());
- }
- else
- {
- g_pSurface->DrawT(x_offset + 20, y_offset - 3, Color(143, 143, 143, MenuAlpha_Main), Globals::WTFont, false,
- name.c_str());
- g_pSurface->FilledRect(x_offset + 6, y_offset, size, size, Color(30, 30, 10, MenuAlpha_Main));
- }
- g_pSurface->OutlinedRect(x_offset + 6, y_offset, size, size, Color(0, 0, 0, MenuAlpha_Main / 1.05));
- // g_pSurface->DrawT(x_offset + 40, y_offset - 4, Color(0, 0, 0, MenuAlpha_Main), g::WTFont, false, name.c_str());
- y_offset += 16;
- }
- void Menu::combobox(int size, std::string name, std::string* itemname, int* item)
- {
- if (groupbox_bottom <= y_offset + 25)
- return;
- bool pressed = false;
- bool open = false;
- static bool selected_opened = false;
- static bool click_rest;
- static bool rest;
- static std::string name_selected;
- int ComboSize = 180; // 163
- static int offset = 0;
- if (name == "")
- {
- offset = -3;
- }
- else
- {
- offset = 14;
- }
- if (menuOpened)
- {
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 20, y_offset + offset, ComboSize, 20)
- && !click_rest && !dont_recieve_input)
- {
- name_selected = name;
- pressed = true;
- click_rest = true;
- }
- else if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(
- x_offset + 20, y_offset + offset, ComboSize, 20))
- click_rest = false;
- if (pressed)
- {
- if (!rest)
- selected_opened = !selected_opened;
- rest = true;
- }
- else
- rest = false;
- if (name_selected == name)
- open = selected_opened;
- }
- g_pSurface->DrawT(x_offset + 20, y_offset - 3, Color(143, 143, 143, MenuAlpha_Main), Globals::WTFont, false,
- name.c_str());
- g_pSurface->FilledRect(x_offset + 20, y_offset + offset, ComboSize, 20, Color(32, 32, 32, MenuAlpha_Main));
- g_pSurface->OutlinedRect(x_offset + 20, y_offset + offset, ComboSize, 20, Color(0, 0, 0, MenuAlpha_Main));
- //
- if (open)
- {
- g_pSurface->FilledRect(x_offset + 20, y_offset + offset + 2 + 19, ComboSize, (size * 19),
- Color(32, 32, 32, MenuAlpha_Main));
- g_pSurface->OutlinedRect(x_offset + 20, y_offset + offset + 2 + 19, ComboSize, (size * 19),
- Color(0, 0, 0, MenuAlpha_Main));
- for (int i = 0; i < size; i++)
- {
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(
- x_offset + 20, y_offset + offset + 4 + 4 + 15 + i * 19, ComboSize, 19))
- {
- *item = i;
- }
- if (i == *item)
- g_pSurface->DrawT(x_offset + 20 + 5, y_offset + offset + 4 + 4 + 15 + i * 19,
- Color(143, 143, 143, MenuAlpha_Main), Globals::WTFont, false, itemname[i].c_str());
- else
- g_pSurface->DrawT(x_offset + 20 + 5, y_offset + offset + 4 + 4 + 15 + i * 19,
- Color(143, 143, 143, MenuAlpha_Main), Globals::WTFont, false, itemname[i].c_str());
- }
- }
- // 143 143 143
- g_pSurface->DrawT(x_offset + 20 + 5, y_offset + offset + 3, Color(143, 143, 143, MenuAlpha_Main),
- Globals::WTFont, false, itemname[*item].c_str());
- if (open) // i added 1 more to 42 bec the space between the main box and the drop down
- {
- if (name == "")
- {
- y_offset += 47 - 26 + (size * 19);
- }
- else
- {
- y_offset += 47 + (size * 19);
- }
- }
- else
- {
- if (name == "")
- {
- y_offset += 47 - 26;
- }
- else
- {
- y_offset += 41;
- }
- }
- }
- void Menu::slider(int max, std::string name, int* item, std::string suffix, int step)
- {
- if (groupbox_bottom <= y_offset + 30)
- return;
- float SliderSize = 193; // 193
- float _pixel_value = max / SliderSize;
- int sub = 0;
- //if (PreviousControl == slider) sub = 4; else sub = 0;
- //float pixelValue = max / 96.f;
- float pixelValue = max / SliderSize;
- // if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 7, y_offset + 15 - sub, 107, 10))
- // * item = (g_pSurface->GetMousePosition().x - (x_offset + 8)) * pixelValue;
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 7, y_offset + 15, 140, 10))
- * item = (g_pSurface->GetMousePosition().x - (x_offset + 8)) * pixelValue;
- if (*item > max)
- * item = max;
- if (*item < 0)
- * item = 0;
- static bool pressed_subtract = false;
- static bool pressed_add = false;
- //subtract
- if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 126, y_offset - 3, 9, 9)) {
- if (pressed_subtract)
- * item -= step;
- pressed_subtract = false;
- }
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 126, y_offset - 3, 9, 9) && !pressed_subtract) pressed_subtract = true;
- //addition
- if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 136, y_offset - 3, 9, 9)) {
- if (pressed_add)
- * item += step;
- pressed_add = false;
- }
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 136, y_offset - 3, 9, 9) && !pressed_add) pressed_add = true;
- g_pSurface->DrawT(x_offset + 126, y_offset - 3, Color(180, 180, 180), Globals::WTFont, false, "-");
- g_pSurface->DrawT(x_offset + 136, y_offset - 3, Color(180, 180, 180), Globals::WTFont, false, "+");
- GradientV(x_offset + 14, y_offset + 15 - sub, 136, 11, Color(24, 24, 24, 255), Color(70, 70, 70, 255));
- // g_pSurface->FilledRect(x_offset + 14, y_offset + 15 - sub, (*item / pixelValue), 7, Color(220, 150, 0, 255));
- 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));
- //g_pSurface->FilledRect(x_offset + 9 + (*item / pixelValue), y_offset + 15 - sub, 4, 8, Color(66, 66, 66, 250));
- g_pSurface->OutlinedRect(x_offset + 14, y_offset + 15 - sub, 136, 11, Color(25, 25, 25));
- // g_pSurface->FilledRect(x_offset + 8 + (*item / pixelValue), y_offset + 13, 3, 11, Color(30, 30, 30, 255));
- std::string additives;
- std::string amount;
- amount += std::to_string(*item);
- additives += name;
- additives += " ";
- // additives += std::to_string(*item);
- g_pSurface->DrawT(x_offset + 14, y_offset - 2, Color(180, 180, 180), Globals::WTFont, false, additives.c_str());
- g_pSurface->DrawT(x_offset + 15 + (*item / pixelValue), y_offset + 13, Color(185, 185, 185), Globals::WTFont, false, amount.c_str());
- // OldOffsetY = OffsetY;
- y_offset += 27;
- //PreviousControl = slider;
- }
- void Menu::MultiComboBox(float indexes, std::string name, std::string* itemname, bool* item)
- {
- static bool multiPressed = false;
- bool pressed = false;
- bool open = false;
- static bool selectedOpened = false;
- static bool clickRest;
- static bool rest;
- static std::string nameSelected;
- std::string itemsSelected = "";
- int lastItem = 0;
- int ComboSize = 180;
- int offset = 0;
- if (name == "")
- {
- offset = 0;
- }
- else
- {
- offset = 14;
- }
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 20, y_offset + offset, ComboSize, 17) && !clickRest
- )
- {
- nameSelected = name;
- pressed = true;
- clickRest = true;
- }
- else if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 20, y_offset + offset, ComboSize, 20))
- clickRest = false;
- if (pressed)
- {
- if (!rest)
- selectedOpened = !selectedOpened;
- rest = true;
- }
- else
- rest = false;
- if (nameSelected == name)
- open = selectedOpened;
- g_pSurface->DrawT(x_offset + 20, y_offset - 3, Color(143, 143, 143, MenuAlpha_Main), Globals::WTFont, false,
- name.c_str());
- g_pSurface->FilledRect(x_offset + 20, y_offset + offset - 2, ComboSize, 20, Color(32, 32, 32, MenuAlpha_Main));
- g_pSurface->OutlinedRect(x_offset + 20, y_offset + offset - 2, ComboSize, 20, Color(0, 0, 0, MenuAlpha_Main));
- if (open)
- {
- g_pSurface->FilledRect(x_offset + 20, y_offset + offset + 2 + 19, ComboSize, (indexes * 19),
- Color(32, 32, 32, MenuAlpha_Main));
- g_pSurface->OutlinedRect(x_offset + 20, y_offset + offset + 2 + 19, ComboSize, (indexes * 19),
- Color(0, 0, 0, MenuAlpha_Main));
- for (int i = 0; i < indexes; i++)
- {
- if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(
- x_offset + 20, y_offset + offset + 4 + 4 + 15 + i * 19, ComboSize, 20))
- {
- if (multiPressed)
- item[i] = !item[i];
- multiPressed = false;
- }
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(
- x_offset + 20, y_offset + offset + 16 + (i * 19), ComboSize, 20) && !multiPressed)
- multiPressed = true;
- if (item[i])
- g_pSurface->DrawT(x_offset + 20 + 5, y_offset + offset + 4 + 4 + 15 + i * 19, Color(255, 255, 255, MenuAlpha_Main),
- Globals::WTFont, false, itemname[i].c_str());
- else
- g_pSurface->DrawT(x_offset + 20 + 5, y_offset + offset + 4 + 4 + 15 + i * 19, Color(185, 185, 185, MenuAlpha_Main),
- Globals::WTFont, false, itemname[i].c_str());
- }
- }
- bool items = false;
- for (int i = 0; i < indexes; i++)
- {
- if (item[i])
- {
- if (lastItem < i)
- lastItem = i;
- }
- }
- for (int i = 0; i < indexes; i++)
- {
- if (item[i])
- {
- items = true;
- RECT TextSize = g_pSurface->GetTextSizeRect(Globals::WTFont, itemsSelected.c_str());
- RECT TextSizeGonaAdd = g_pSurface->GetTextSizeRect(Globals::WTFont, itemname[i].c_str());
- if (TextSize.right + TextSizeGonaAdd.right < ComboSize)
- itemsSelected += std::to_string(i) + ((lastItem == i) ? "" : ", ");
- }
- }
- if (!items)
- itemsSelected = "Disabled";
- g_pSurface->DrawT(x_offset + 20 + 5, y_offset + offset + 1, Color(143, 143, 143, MenuAlpha_Main), Globals::WTFont, false,
- itemsSelected.c_str());
- if (open) // i added 1 more to 42 bec the space between the main box and the drop down
- y_offset += 52 + (indexes * 16);
- else
- y_offset += 41;
- }
- char* KeyStringsStick[254] = {
- "INVLD", "M1", "M2", "BRK", "M3", "M4", "M5",
- "INVLD", "BSPC", "TAB", "INVLD", "INVLD", "INVLD", "ENTER", "INVLD", "INVLD", "SHI",
- "CTRL", "ALT", "PAU", "CAPS", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
- "ESC", "INVLD", "INVLD", "INVLD", "INVLD", "SPACE", "PGUP", "PGDOWN", "END", "HOME", "LEFT",
- "UP", "RIGHT", "DOWN", "INVLD", "PRNT", "INVLD", "PRTSCR", "INS", "DEL", "INVLD", "0", "1",
- "2", "3", "4", "5", "6", "7", "8", "9", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
- "INVLD", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U",
- "V", "W", "X", "Y", "Z", "LFTWIN", "RGHTWIN", "INVLD", "INVLD", "INVLD", "NUM0", "NUM1",
- "NUM2", "NUM3", "NUM4", "NUM5", "NUM6", "NUM7", "NUM8", "NUM9", "*", "+", "_", "-", ".", "/", "F1", "F2", "F3",
- "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16", "F17", "F18", "F19", "F20",
- "F21",
- "F22", "F23", "F24", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
- "NUM LOCK", "SCROLL LOCK", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
- "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "LSHFT", "RSHFT", "LCTRL",
- "RCTRL", "LMENU", "RMENU", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
- "INVLD", "INVLD", "INVLD", "NTRK", "PTRK", "STOP", "PLAY", "INVLD", "INVLD",
- "INVLD", "INVLD", "INVLD", "INVLD", ";", "+", ",", "-", ".", "/?", "~", "INVLD", "INVLD",
- "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
- "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
- "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "{", "\\|", "}", "'\"", "INVLD",
- "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
- "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
- "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD", "INVLD",
- "INVLD", "INVLD"
- };
- bool keys[256];
- bool oldKeys[256];
- bool GetKeyPress(unsigned int key)
- {
- if (keys[key] == true && oldKeys[key] == false)
- return true;
- return false;
- }
- void Menu::keybind(int* item, std::string name)
- {
- if (groupbox_bottom <= y_offset + 41)
- return;
- int ComboSize = 180; // 163
- static std::string nameSelected;
- static bool IsGettingKey = false;
- static int Key = 0;
- static bool GoodKeyName = false;
- Color text_color = Color(120, 120, 120, 255);
- std::copy(keys, keys + 255, oldKeys);
- for (int x = 0; x < 255; x++)
- {
- //oldKeys[x] = oldKeys[x] & keys[x];
- keys[x] = (GetAsyncKeyState(x));
- }
- char NameBuffer[128];
- char* KeyName = "Unbinded";
- RECT text_size = g_pSurface->GetTextSizeRect(Globals::WTFont, KeyName);
- static bool LetsBindy0 = false;
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 20, y_offset, 157, 20) && menuOpened)
- {
- if (!IsGettingKey)
- {
- IsGettingKey = true;
- }
- }
- if (IsGettingKey)
- {
- for (int i = 0; i < 255; i++)
- {
- if (GetKeyPress(i))
- {
- if (i == VK_ESCAPE)
- {
- Key = -1;
- *item = Key;
- IsGettingKey = false;
- return;
- }
- Key = i;
- *item = Key;
- IsGettingKey = false;
- return;
- }
- }
- }
- if (IsGettingKey)
- {
- KeyName = "~~~~~";
- text_color = Color(143, 143, 143, 255);
- }
- else
- {
- if (*item >= 0)
- {
- KeyName = KeyStringsStick[*item];
- if (KeyName)
- {
- GoodKeyName = true;
- }
- else
- {
- if (GetKeyNameText(*item << 16, NameBuffer, 127))
- {
- KeyName = NameBuffer;
- GoodKeyName = true;
- }
- }
- }
- if (!GoodKeyName)
- {
- KeyName = "Unbinded";
- }
- }
- if (manually_set_key)
- {
- Key = *item;
- manually_set_key = false;
- }
- g_pSurface->FilledRect(x_offset + 20, y_offset, ComboSize, 20, Color(32, 32, 32, MenuAlpha_Main));
- g_pSurface->OutlinedRect(x_offset + 20, y_offset, ComboSize, 20, Color(0, 0, 0, MenuAlpha_Main));
- g_pSurface->DrawT(x_offset + 20 + 5, y_offset + 3, Color(143, 143, 143, MenuAlpha_Main), Globals::WTFont, false,
- KeyName);
- y_offset += 29;
- }
- unsigned int rgb(double hue)
- {
- int h = int(hue * 256 * 6);
- int x = h % 0x100;
- int r = 0, g = 0, b = 0;
- switch (h / 256)
- {
- case 0: r = 255;
- g = x;
- break;
- case 1: g = 255;
- r = 255 - x;
- break;
- case 2: g = 255;
- b = x;
- break;
- case 3: b = 255;
- g = 255 - x;
- break;
- case 4: b = 255;
- r = x;
- break;
- case 5: r = 255;
- b = 255 - x;
- break;
- }
- return r + (g << 8) + (b << 16);
- }
- void color_spectrum(int x, int y)
- {
- int Width = 168, Height = 179;
- for (int i = 0; i < Width; i++)
- {
- int div = Width / 6;
- int phase = i / div;
- float t = (i % div) / (float)div;
- int r, g, b;
- switch (phase)
- {
- case(0):
- r = 255;
- g = 255 * t;
- b = 0;
- break;
- case(1):
- r = 255 * (1.f - t);
- g = 255;
- b = 0;
- break;
- case(2):
- r = 0;
- g = 255;
- b = 255 * t;
- break;
- case(3):
- r = 0;
- g = 255 * (1.f - t);
- b = 255;
- break;
- case(4):
- r = 255 * t;
- g = 0;
- b = 255;
- break;
- case(5):
- r = 255;
- g = 0;
- b = 255 * (1.f - t);
- break;
- }
- for (int k = 0; k < Height; k++)
- {
- float sat = k / (float)Height;
- int _r = r + sat * (128 - r);
- int _g = g + sat * (128 - g);
- int _b = b + sat * (128 - b);
- g_pSurface->DrawSetColor(_r, _g, _b, 255);
- g_pSurface->DrawFilledRect(10 + i, 10 + k, 1, 1);
- }
- }
- }
- #include <conio.h>
- #include <iostream>
- #include <windows.h>
- #include <stdlib.h>
- void Menu::EmptySpace(std::string name)
- {
- if (groupbox_bottom <= y_offset + 16)
- return;
- g_pSurface->DrawT(x_offset + 20, y_offset - 3, Color(143, 143, 143, MenuAlpha_Main), Globals::WTFont, false,
- name.c_str());
- y_offset += 16;
- }
- void Menu::color_selector(std::string name, int* red, int* green, int* blue, int* alpha)
- {
- if (groupbox_bottom <= y_offset + 16)
- return;
- bool pressed = false;
- bool open = false;
- static bool selected_opened = false;
- static bool click_rest;
- static bool rest;
- static std::string name_selected;
- int ComboSize = 127; // 163
- int ComboSizeH = 127; // 163
- static int offset = 0;
- if (name == "sadasd")
- {
- offset = 0;
- }
- else
- {
- offset = 14;
- }
- if (menuOpened)
- {
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 225, y_offset + 1, 15, 8) && !
- click_rest)
- {
- name_selected = name;
- pressed = true;
- click_rest = true;
- }
- else if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 225, y_offset + 1, 15, 8))
- click_rest = false;
- if (pressed)
- {
- if (!rest)
- selected_opened = !selected_opened;
- rest = true;
- }
- else
- rest = false;
- if (name_selected == name)
- open = selected_opened;
- }
- static unsigned int r = 255;
- static unsigned int g = 0;
- static unsigned int b = 0;
- static unsigned int selected_r = 0;
- static unsigned int selected_g = 0;
- static unsigned int selected_b = 0;
- static Vector2D MousePos;
- COLORREF color;
- COLORREF selected_color;
- if (open)
- {
- dont_recieve_input = true;
- g_pSurface->FilledRect(x_offset + 225 - ComboSize - 5, y_offset, ComboSize, ComboSizeH,
- Color(21, 23, 27, MenuAlpha_Main));
- g_pSurface->OutlinedRect(x_offset + 225 - ComboSize - 5, y_offset, ComboSize, ComboSizeH,
- Color(42, 46, 46, MenuAlpha_Main));
- g_pSurface->OutlinedRect(x_offset + 225 - ComboSize - 5 - 1, y_offset - 1, ComboSize + 2, ComboSizeH + 2,
- Color(34, 38, 37, MenuAlpha_Main));
- float _pixel_value = 255 / (ComboSize - 5 - 17);
- //if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 20 - 3, y_offset + 14, SliderSize + (3 * 2), 8)) {
- // *item = abs(g_pSurface->GetMousePosition().x - (x_offset + 20)) * _pixel_value;
- //}
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 225 - ComboSize - 5 + 5,
- y_offset + ComboSizeH - 11, (ComboSize - 5 - 17),
- 7) && menuOpened)
- {
- *alpha = abs(g_pSurface->GetMousePosition().x - (x_offset + 225 - ComboSize - 5 + 5)) * _pixel_value;
- }
- if (*alpha < 3)
- {
- *alpha = 0;
- }
- if (*alpha > 204)
- {
- *alpha = 255;
- }
- g_pSurface->FilledRect(x_offset + 225 - ComboSize - 5 + 5, y_offset + ComboSizeH - 11, ComboSize - 5 - 17, 7,
- Color(255, 255, 255, *alpha));
- g_pSurface->OutlinedRect(x_offset + 225 - ComboSize - 5 + 5, y_offset + ComboSizeH - 11, ComboSize - 5 - 17, 7,
- Color(0, 0, 0, MenuAlpha_Main));
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 233 - ComboSize + 101 + 1,
- y_offset + 5 + 1, 7 - 2, 107 - 1))
- {
- HDC hdc = GetDC(nullptr);
- color = GetPixel(hdc, g_pSurface->GetMousePosition().x, g_pSurface->GetMousePosition().y);
- r = GetRValue(color);
- g = GetGValue(color);
- b = GetBValue(color);
- }
- GradientH(x_offset + 225 - ComboSize - 5 + 5, y_offset + 5, ComboSize - 5 - 17, ComboSizeH - 20,
- Color(255, 255, 255), Color(r, g, b));
- GradientVEnd(x_offset + 225 - ComboSize - 5 + 5, y_offset + 40, ComboSize - 5 - 17, ComboSizeH - 20,
- Color(0, 0, 0), Color(0, 0, 0));
- //g_pSurface->OutlinedRect(MousePos.x - 4, MousePos.y - 4, 8, 8, Color(0, 0, 0, MenuAlpha_Main));
- g_pSurface->OutlinedRect(x_offset + 225 - ComboSize - 5 + 5, y_offset + 5, ComboSize - 5 - 17, ComboSizeH - 20,
- Color(0, 0, 0, MenuAlpha_Main));
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 225 - ComboSize - 5 + 5 + 1,
- y_offset + 5 + 1, ComboSize - 5 - 17 - 2,
- ComboSizeH - 20 - 2))
- {
- HDC hdc = GetDC(nullptr);
- selected_color = GetPixel(hdc, g_pSurface->GetMousePosition().x, g_pSurface->GetMousePosition().y);
- selected_r = GetRValue(selected_color);
- selected_g = GetGValue(selected_color);
- selected_b = GetBValue(selected_color);
- *red = selected_r;
- *green = selected_g;
- *blue = selected_b;
- MousePos = Vector2D(g_pSurface->GetMousePosition().x, g_pSurface->GetMousePosition().y);
- }
- Color rainbow; int hue;
- for (int i = 0; i < 100; i++)
- {
- float hue = (i * .01f);
- rainbow.FromHSV(hue, 1.f, 1.f);
- g_pSurface->FilledRect(x_offset + 233 - ComboSize + 101, y_offset + 5 + i, 7, 8, rainbow);
- g_pSurface->OutlinedRect(x_offset + 233 - ComboSize + 101, y_offset + 5, 7, 107, Color(0, 0, 0, 255));
- }
- }
- else
- {
- dont_recieve_input = false;
- }
- if (*red > 20 && *green > 20 && *blue > 20)
- {
- g_pSurface->FilledRect(x_offset + 225, y_offset, 15, 7, Color(*red, *green, *blue, MenuAlpha_Main));
- }
- else
- {
- g_pSurface->FilledRect(x_offset + 225, y_offset, 15, 7, Color(*red, *green, *blue, MenuAlpha_Main));
- }
- g_pSurface->OutlinedRect(x_offset + 225 - 1, y_offset - 1, 15 + 2, 7 + 2, Color(0, 0, 0, MenuAlpha_Main));
- if (open)
- {
- y_offset += ComboSizeH;
- }
- /*
- Color rainbow;
- Color Test2;
- static float test;
- static DWORD color;
- static DWORD store_color;
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 225 - 93, y_offset + 1, 108, 8)) {
- }
- else {
- unsigned int r = GetRValue(color);
- unsigned int g = GetGValue(color);
- unsigned int b = GetBValue(color);
- *red = r;
- *green = g;
- *blue = b;
- GradientV(x_offset + 225, y_offset, 16, 9, Color(*red, *green, *blue), Color(*red, *green, *blue));
- g_pSurface->OutlinedRect(x_offset + 225, y_offset, 16, 9, Color(0, 0, 0, MenuAlpha_Main));
- }
- */
- }
- char* KeyDigits[254] = {
- nullptr, "Left Mouse", "Right Mouse", "Control+Break", "Middle Mouse", "Mouse 4", "Mouse 5",
- nullptr, "Backspace", "TAB", nullptr, nullptr, nullptr, "ENTER", nullptr, nullptr, "SHIFT", "CTRL", "ALT", "PAUSE",
- "CAPS LOCK", nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, "ESC", nullptr, nullptr, nullptr, nullptr,
- "SPACEBAR",
- "PG UP", "PG DOWN", "END", "HOME", "Left", "Up", "Right", "Down", nullptr, "Print", nullptr, "Print Screen",
- "Insert",
- "Delete", nullptr, "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", nullptr, nullptr, nullptr, nullptr, nullptr,
- nullptr,
- nullptr, "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U",
- "V", "W", "X",
- "Y", "Z", "Left Windows", "Right Windows", nullptr, nullptr, nullptr, "0", "1", "2", "3", "4", "5", "6",
- "7", "8", "9", "*", "+", "_", "-", ".", "/", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11",
- "F12",
- "F13", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "F21", "F22", "F23", "F24", nullptr, nullptr, nullptr,
- nullptr, nullptr,
- nullptr, nullptr, nullptr, "NUM LOCK", "SCROLL LOCK", nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
- nullptr, nullptr,
- nullptr, nullptr, nullptr, nullptr, nullptr, "LSHIFT", "RSHIFT", "LCONTROL", "RCONTROL", "LMENU", "RMENU", nullptr,
- nullptr, nullptr,
- nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, "Next Track", "Previous Track", "Stop", "Play/Pause",
- nullptr, nullptr,
- nullptr, nullptr, nullptr, nullptr, ";", "+", ",", "-", ".", "/?", "~", nullptr, nullptr, nullptr, nullptr,
- nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
- nullptr, nullptr,
- nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, "[{", "\\|", "}]", "'\"", nullptr, nullptr, nullptr,
- nullptr,
- nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
- nullptr, nullptr,
- nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr
- };
- void Menu::TextBox(std::string name, std::string* text)
- {
- if (groupbox_bottom <= y_offset + 16)
- return;
- bool pressed = false;
- bool open = false;
- static bool selected_opened = false;
- static bool click_rest;
- static bool rest;
- static std::string name_selected;
- int ComboSize = 127; // 163
- int ComboSizeH = 127; // 163
- static int offset = 0;
- if (name == "")
- {
- offset = 0;
- }
- else
- {
- offset = 14;
- }
- std::copy(keys, keys + 255, oldKeys);
- for (int x = 0; x < 255; x++)
- {
- //oldKeys[x] = oldKeys[x] & keys[x];
- keys[x] = (GetAsyncKeyState(x));
- }
- if (menuOpened)
- {
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 225, y_offset + 1, 15, 8) && !
- click_rest)
- {
- name_selected = name;
- pressed = true;
- click_rest = true;
- }
- else if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 225, y_offset + 1, 15, 8))
- click_rest = false;
- if (pressed)
- {
- if (!rest)
- selected_opened = !selected_opened;
- rest = true;
- }
- else
- rest = false;
- if (name_selected == name)
- open = selected_opened;
- }
- const char* strg = text->c_str();
- if (open)
- {
- for (int i = 0; i < 255; i++)
- {
- if (GetKeyPress(i))
- {
- if (i == VK_ESCAPE || i == VK_RETURN || i == VK_INSERT)
- {
- open = false;
- return;
- }
- if (i == VK_BACK && strlen(strg) != 0)
- {
- *text = text->substr(0, strlen(strg) - 1);
- }
- if (strlen(strg) < 6 && (i == 0x30 || i == 0x31 || i == 0x32 || i == 0x33 || i == 0x34 || i == 0x35 || i
- == 0x36 || i == 0x37 || i == 0x38 || i == 0x39 || i == VK_NUMPAD0 || i == VK_NUMPAD1 || i ==
- VK_NUMPAD2 || i == VK_NUMPAD3 || i == VK_NUMPAD4 || i == VK_NUMPAD5 || i == VK_NUMPAD6 || i ==
- VK_NUMPAD7 || i == VK_NUMPAD8 || i == VK_NUMPAD9))
- {
- *text = *text + KeyDigits[i];
- return;
- }
- }
- }
- }
- const char* cstr = text->c_str();
- g_pSurface->FilledRect(x_offset + 20, y_offset, ComboSize, 20, Color(32, 32, 32, MenuAlpha_Main));
- g_pSurface->OutlinedRect(x_offset + 20, y_offset, ComboSize, 20, Color(0, 0, 0, MenuAlpha_Main));
- g_pSurface->DrawT(x_offset + 20 + 5, y_offset + 3, Color(143, 143, 143, MenuAlpha_Main), Globals::WTFont, false,
- cstr);
- y_offset += 29;
- }
- void Menu::button(ButtonCallback_t callback, std::string title)
- {
- if (groupbox_bottom <= y_offset + 18)
- return;
- int ComboSize = 180;
- static bool pressed = false;
- RECT text_size = g_pSurface->GetTextSizeRect(Globals::WTFont, title.c_str());
- if (!GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 20, y_offset, ComboSize, 20) && menuOpened)
- {
- if (pressed)
- {
- if (callback)
- callback();
- }
- pressed = false;
- }
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(x_offset + 20, y_offset, ComboSize, 20) && !pressed)
- pressed = true;
- if (g_pSurface->MouseInRegion(x_offset + 20, y_offset, ComboSize, 20) and GetAsyncKeyState(VK_LBUTTON))
- {
- g_pSurface->FilledRect(x_offset + 20, y_offset, ComboSize, 20, Color(35, 36, 43, MenuAlpha_Main));
- }
- else
- {
- g_pSurface->FilledRect(x_offset + 20, y_offset, ComboSize, 20, Color(32, 32, 32, MenuAlpha_Main));
- }
- g_pSurface->OutlinedRect(x_offset + 20, y_offset, ComboSize, 20, Color(0, 0, 0, MenuAlpha_Main));
- g_pSurface->DrawT(x_offset + 20 + (ComboSize / 2) - (text_size.right / 2),
- y_offset + (20 / 2) - (text_size.bottom / 2) - 1, Color(204, 204, 204, MenuAlpha_Main),
- Globals::WTFont, false, title.c_str());
- y_offset += 26;
- }
- void Menu::ListBox(int x, int y, int w, int h, int size, std::string name, std::string* itemname, int* item) {
- g_pSurface->FilledRect(_pos.x + x, _pos.y + y, w, h, Color(25, 26, 33, MenuAlpha_Main));
- g_pSurface->OutlinedRect(_pos.x + x, _pos.y + y, w, h, Color(40, 44, 53, MenuAlpha_Main));
- g_pSurface->FilledRect(_pos.x + x + 1, _pos.y + y + 1, w - 2, 15, Color(31, 31, 38, MenuAlpha_Main));
- 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));
- g_pSurface->DrawT(_pos.x + x + (w / 2), _pos.y + y + 1, Color(143, 143, 143, MenuAlpha_Main), Globals::WTFont, true, name.c_str());
- for (int i = 0; i < size; i++) {
- RECT Area = { _pos.x + x, _pos.y + y + 17 + (16 * i), w, 15 };
- if (GetAsyncKeyState(VK_LBUTTON) && g_pSurface->MouseInRegion(Area.left, Area.top, Area.right, Area.bottom) && menuOpened) {
- *item = i;
- }
- if (*item == i) {
- g_pSurface->FilledRect(Area.left, Area.top, Area.right, Area.bottom, Color(28, 28, 35, MenuAlpha_Main));
- }
- else {
- g_pSurface->FilledRect(Area.left, Area.top, Area.right, Area.bottom, Color(21, 21, 28, MenuAlpha_Main));
- }
- g_pSurface->OutlinedRect(Area.left, Area.top, Area.right, Area.bottom, Color(40, 44, 53, MenuAlpha_Main));
- g_pSurface->DrawT(Area.left + (Area.right / 2), Area.top + 1, Color(143, 143, 143, MenuAlpha_Main), Globals::WTFont, true, itemname[i].c_str());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement