Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 43.38 KB | None | 0 0
  1. #include "menu.hpp"
  2. #include "imgui/imgui.h"
  3. #include "imgui/imgui_internal.h"
  4. #include "../features/misc/logs.hpp"
  5. #include "../features/skinchanger/parser.hpp"
  6.  
  7. c_menu menu;
  8.  
  9. #define UNLEN 256
  10. IDirect3DStateBlock9 *state_block;
  11. bool reverse = false;
  12. int offset = 0;
  13. bool show_popup = false;
  14. bool save_config = false;
  15. bool load_config = false;
  16. namespace ImGui {
  17. long get_mils() {
  18. auto duration = std::chrono::system_clock::now().time_since_epoch();
  19. return std::chrono::duration_cast<std::chrono::milliseconds>(duration).count();
  20. }
  21.  
  22. void begin_popup(const char* text, int on_screen_mils, bool* done) {
  23. if (!done)
  24. show_popup = true;
  25.  
  26. ImGuiIO &io = ImGui::GetIO();
  27. ImGuiStyle& style = ImGui::GetStyle();
  28. int width = io.DisplaySize.x;
  29. static long old_time = -1;
  30. ImGui::SetNextWindowPos(ImVec2(width - offset, 100));
  31. style.WindowMinSize = ImVec2(100.f, 20.f);
  32. ImGui::Begin("##PopUpWindow", &show_popup, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize);
  33. ImVec2 p = ImGui::GetCursorScreenPos();
  34.  
  35. ImGui::GetWindowDrawList()->AddRectFilledMultiColor(ImVec2(p.x - 15, p.y - 13), ImVec2(p.x + ImGui::GetWindowWidth(), p.y - 16), ImColor(167, 24, 71, 255), ImColor(58, 31, 87, 255), ImColor(58, 31, 87, 255), ImColor(167, 24, 71, 255));
  36.  
  37. long current_time_ms = get_mils();
  38.  
  39. ImVec2 text_size = ImGui::CalcTextSize(text);
  40. ImGui::SetCursorPosY(ImGui::GetWindowHeight() / 2 - text_size.y / 2);
  41. ImGui::Text(text);
  42.  
  43. if (!reverse) {
  44. if (offset < ImGui::GetWindowWidth())
  45. offset += (ImGui::GetWindowWidth() + 5) * ((1000.0f / ImGui::GetIO().Framerate) / 100);
  46.  
  47. if (offset >= ImGui::GetWindowWidth() && old_time == -1) {
  48. old_time = current_time_ms;
  49. }
  50. }
  51.  
  52. if (current_time_ms - old_time >= on_screen_mils && old_time != -1)
  53. reverse = true;
  54.  
  55. if (reverse) {
  56. if (offset > 0)
  57. offset -= (ImGui::GetWindowWidth() + 5) * ((1000.0f / ImGui::GetIO().Framerate) / 100);
  58. if (offset <= 0) {
  59. offset = 0;
  60. reverse = false;
  61. *done = true;
  62. old_time = -1;
  63. show_popup = false;
  64. }
  65. }
  66.  
  67. ImGui::End();
  68. }
  69. }
  70.  
  71. void c_menu::run() {
  72. static int page = 0;
  73.  
  74. if (opened) {
  75. ImGui::GetStyle().Colors[ImGuiCol_CheckMark] = ImVec4(167 / 255.f, 24 / 255.f, 71 / 255.f, 1.f);
  76. ImGui::GetStyle().Colors[ImGuiCol_SliderGrab] = ImVec4(167 / 255.f, 24 / 255.f, 71 / 255.f, 1.f);
  77. ImGui::GetStyle().Colors[ImGuiCol_SliderGrabActive] = ImVec4(167 / 255.f, 24 / 71, 247 / 255.f, 1.f);
  78.  
  79. ImGui::SetNextWindowSize(ImVec2(600, 600), ImGuiSetCond_FirstUseEver);
  80. ImGui::Begin("Peccancy", &opened, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_ShowBorders | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoTitleBar); {
  81. ImVec2 p = ImGui::GetCursorScreenPos();
  82. ImColor c = ImColor(32, 114, 247);
  83.  
  84. ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(p.x, p.y + 30), ImVec2(p.x + ImGui::GetWindowWidth(), p.y - 3), ImColor(30, 30, 39));
  85. ImGui::GetWindowDrawList()->AddRectFilledMultiColor(ImVec2(p.x, p.y + 32), ImVec2(p.x + ImGui::GetWindowWidth(), p.y + +30), ImColor(167, 24, 71, 255), ImColor(58, 31, 87, 255), ImColor(58, 31, 87, 255), ImColor(167, 24, 71, 255));
  86. ImGui::PushFont(font_menu);
  87. ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 7);
  88. ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 7);
  89. ImGui::Text("Peccancy");
  90. ImGui::SameLine();
  91.  
  92. ImGui::SetCursorPosY(ImGui::GetCursorPosY() - 9);
  93. if (ImGui::ButtonT("Legit", ImVec2(40, 30), page, 0, false, false)) page = 0; ImGui::SameLine(0, 0);
  94. if (ImGui::ButtonT("Visuals", ImVec2(40, 30), page, 1, false, false)) page = 1; ImGui::SameLine(0, 0);
  95. if (ImGui::ButtonT("Misc", ImVec2(40, 30), page, 2, false, false)) page = 2; ImGui::SameLine(0, 0);
  96. if (ImGui::ButtonT("Skins", ImVec2(40, 30), page, 3, false, false)) page = 3; ImGui::SameLine(0, 0);
  97. if (ImGui::ButtonT("CFG", ImVec2(40, 30), page, 4, false, false)) page = 4; ImGui::SameLine(0, 0);
  98. ImGui::PopFont();
  99.  
  100. ImGui::PushFont(font_menu);
  101. ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 45);
  102. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 222);
  103.  
  104. ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(16, 16));
  105. ImGui::PushStyleColor(ImGuiCol_ChildWindowBg, ImVec4(30 / 255.f, 30 / 255.f, 39 / 255.f, 1.0f));
  106. ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0 / 255.f, 0 / 255.f, 0 / 255.f, 0.1f));
  107.  
  108. if (config_system.item.visuals_preview) {
  109. run_visuals_preview();
  110. }
  111.  
  112. ImGui::PopStyleColor();
  113. ImGui::PopStyleColor();
  114. ImGui::PopStyleVar();
  115.  
  116. static int test = 0;
  117. switch (page) {
  118. case 0:
  119. ImGui::Columns(2, NULL, false);
  120. ImGui::Dummy(ImVec2(0, -2)); ImGui::SameLine();
  121. ImGui::Dummy(ImVec2(0, 0)); ImGui::SameLine();
  122. ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(16, 16));
  123.  
  124. //push window color for child
  125. ImGui::PushStyleColor(ImGuiCol_ChildWindowBg, ImVec4(30 / 255.f, 30 / 255.f, 39 / 255.f, 1.0f));
  126. //push border color for child
  127. ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0 / 255.f, 0 / 255.f, 0 / 255.f, 0.1f));
  128. ImGui::BeginChild("aimbot", ImVec2(279, 268), true); {
  129. ImGui::Checkbox("active", &config_system.item.aim_enabled);
  130. ImGui::PushStyleColor(ImGuiCol_Text, config_system.item.aim_enabled ? ImVec4(1.f, 1.f, 1.f, 1) : ImVec4(.6f, .6f, .6f, 1));
  131. ImGui::Combo("mode", &config_system.item.aim_mode, "hitbox\0nearest hitbox"); //todo add custom bone selection - designer
  132. ImGui::PopStyleColor();
  133. ImGui::Checkbox("dynamic fov", &config_system.item.aim_distance_based_fov);
  134. ImGui::Checkbox("silent aim", &config_system.item.aim_silent);
  135. ImGui::Checkbox("scope aim", &config_system.item.scope_aim);
  136. ImGui::Checkbox("smoke aim", &config_system.item.smoke_check);
  137. ImGui::Checkbox("friendly fire", &config_system.item.aim_team_check);
  138. ImGui::Checkbox("auto pistol", &config_system.item.aimbot_auto_pistol);
  139. ImGui::PushStyleColor(ImGuiCol_Text, config_system.item.aim_enabled ? ImVec4(1.f, 1.f, 1.f, 1) : ImVec4(.6f, .6f, .6f, 1));
  140. ImGui::SliderInt("kill delay", &config_system.item.aimbot_delay_after_kill, 0, 350);
  141. ImGui::PopStyleColor();
  142.  
  143. } ImGui::EndChild(true);
  144.  
  145. ImGui::PopStyleVar();
  146. ImGui::Dummy(ImVec2(0, -2)); ImGui::SameLine();
  147. ImGui::Dummy(ImVec2(0, 0)); ImGui::SameLine();
  148. ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(16, 16));
  149.  
  150. ImGui::BeginChild("backtrack", ImVec2(279, 267), true); {
  151. ImGui::Checkbox("active", &config_system.item.backtrack);
  152. ImGui::PushStyleColor(ImGuiCol_Text, config_system.item.backtrack ? ImVec4(1.f, 1.f, 1.f, 1) : ImVec4(.6f, .6f, .6f, 1));
  153. ImGui::SliderFloat("records (ms)", &config_system.item.backtrack_ms, 1.0f, 200.0f, "%.2f");
  154. ImGui::PopStyleColor();
  155. }
  156. ImGui::EndChild(true);
  157.  
  158. ImGui::NextColumn();
  159.  
  160. ImGui::BeginChild("settings", ImVec2(279, 543), true); {
  161. if (ImGui::ButtonT("pistol", ImVec2(50, 30), test, 0, false, ImColor(0, 0, 0))) test = 0; ImGui::SameLine(0, 0);
  162. if (ImGui::ButtonT("rifle", ImVec2(50, 30), test, 1, false, false)) test = 1; ImGui::SameLine(0, 0);
  163. if (ImGui::ButtonT("sniper", ImVec2(50, 30), test, 2, false, false)) test = 2; ImGui::SameLine(0, 0);
  164. if (ImGui::ButtonT("smg", ImVec2(50, 30), test, 3, false, false)) test = 3; ImGui::SameLine(0, 0);
  165. if (ImGui::ButtonT("heavy", ImVec2(50, 30), test, 4, false, false)) test = 4;
  166.  
  167. ImGui::PushFont(font_menu);
  168.  
  169. ImGui::PushStyleColor(ImGuiCol_Text, config_system.item.aim_enabled ? ImVec4(1.f, 1.f, 1.f, 1) : ImVec4(.6f, .6f, .6f, 1));
  170. switch (test) {
  171. case 0:
  172. if (config_system.item.aim_mode == 0) {
  173. ImGui::Combo("pistol hitbox", &config_system.item.aim_bone_pistol, "head\0neck\0chest\0stomach\0pelvis");
  174. }
  175. ImGui::SliderFloat("pistol fov", &config_system.item.aim_fov_pistol, 0.0f, 180.0f, "%.2f");
  176. ImGui::SliderFloat("pistol smooth", &config_system.item.aim_smooth_pistol, 1.f, 10.f, "%.2f");
  177. ImGui::SliderFloat("pistol rcs x", &config_system.item.rcs_x_pistol, 0.0f, 1.0f, "%.2f");
  178. ImGui::SliderFloat("pistol rcs y", &config_system.item.rcs_y_pistol, 0.0f, 1.0f, "%.2f");
  179. break;
  180. case 1:
  181. if (config_system.item.aim_mode == 0) {
  182. ImGui::Combo("rifle hitbox", &config_system.item.aim_bone_rifle, "head\0neck\0chest\0stomach\0pelvis");
  183. }
  184. ImGui::SliderFloat("rifle fov", &config_system.item.aim_fov_rifle, 0.0f, 180.0f, "%.2f");
  185. ImGui::SliderFloat("rifle smooth", &config_system.item.aim_smooth_rifle, 1.f, 10.f, "%.2f");
  186. ImGui::SliderFloat("rifle rcs x", &config_system.item.rcs_x_rifle, 0.0f, 1.0f, "%.2f");
  187. ImGui::SliderFloat("rifle rcs y", &config_system.item.rcs_y_rifle, 0.0f, 1.0f, "%.2f");
  188. break;
  189. case 2:
  190. if (config_system.item.aim_mode == 0) {
  191. ImGui::Combo("sniper hitbox", &config_system.item.aim_bone_sniper, "head\0neck\0chest\0stomach\0pelvis");
  192. }
  193. ImGui::SliderFloat("sniper fov", &config_system.item.aim_fov_sniper, 0.0f, 180.0f, "%.2f");
  194. ImGui::SliderFloat("sniper smooth", &config_system.item.aim_smooth_sniper, 1.f, 10.f, "%.2f");
  195. ImGui::SliderFloat("sniper rcs x", &config_system.item.rcs_x_sniper, 0.0f, 1.0f, "%.2f");
  196. ImGui::SliderFloat("sniper rcs y", &config_system.item.rcs_y_sniper, 0.0f, 1.0f, "%.2f");
  197. break;
  198. case 3:
  199. if (config_system.item.aim_mode == 0) {
  200. ImGui::Combo("smg hitbox", &config_system.item.aim_bone_smg, "head\0neck\0chest\0stomach\0pelvis");
  201. }
  202.  
  203. ImGui::SliderFloat("smg fov", &config_system.item.aim_fov_smg, 0.0f, 180.0f, "%.2f");
  204. ImGui::SliderFloat("smg smooth", &config_system.item.aim_smooth_smg, 1.f, 10.f, "%.2f");
  205. ImGui::SliderFloat("smg rcs x", &config_system.item.rcs_x_smg, 0.0f, 1.0f, "%.2f");
  206. ImGui::SliderFloat("smg rcs y", &config_system.item.rcs_y_smg, 0.0f, 1.0f, "%.2f");
  207. break;
  208. case 4:
  209. if (config_system.item.aim_mode == 0) {
  210. ImGui::Combo("heavy hitbox", &config_system.item.aim_bone_heavy, "head\0neck\0chest\0stomach\0pelvis");
  211. }
  212. ImGui::SliderFloat("heavy fov", &config_system.item.aim_fov_heavy, 0.0f, 180.0f, "%.2f");
  213. ImGui::SliderFloat("heavy smooth", &config_system.item.aim_smooth_heavy, 1.f, 10.f, "%.2f");
  214. ImGui::SliderFloat("heavy rcs x", &config_system.item.rcs_x_heavy, 0.0f, 1.0f, "%.2f");
  215. ImGui::SliderFloat("heavy rcs y", &config_system.item.rcs_y_heavy, 0.0f, 1.0f, "%.2f");
  216. break;
  217. }
  218. ImGui::PopStyleColor();
  219.  
  220. ImGui::PopFont();
  221. } ImGui::EndChild(true);
  222. ImGui::PopStyleColor();
  223. ImGui::PopStyleColor();
  224. ImGui::PopStyleVar();
  225.  
  226. break;
  227. case 1:
  228. ImGui::Columns(2, NULL, false);
  229. ImGui::Dummy(ImVec2(0, -2)); ImGui::SameLine();
  230. ImGui::Dummy(ImVec2(0, 0)); ImGui::SameLine();
  231. ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(16, 16));
  232. ImGui::PushStyleColor(ImGuiCol_ChildWindowBg, ImVec4(30 / 255.f, 30 / 255.f, 39 / 255.f, 1.0f));
  233. ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0 / 255.f, 0 / 255.f, 0 / 255.f, 0.1f));
  234.  
  235. ImGui::BeginChild("player", ImVec2(279, 268), true); {
  236. ImGui::Checkbox("active", &config_system.item.visuals_enabled);
  237. if (config_system.item.visuals_enabled) {
  238. ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 7);
  239. ImGui::Checkbox("teammate", &config_system.item.visuals_team_check);
  240. ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 7);
  241. ImGui::Checkbox("visible only", &config_system.item.visuals_visible_only);
  242. ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 7);
  243. ImGui::Checkbox("on key", &config_system.item.visuals_on_key);
  244. }
  245. ImGui::Checkbox("name", &config_system.item.player_name);
  246. ImGui::ColorEdit4("name color", config_system.item.clr_name, ImGuiColorEditFlags_NoInputs);
  247. ImGui::Checkbox("box", &config_system.item.player_box);
  248. ImGui::ColorEdit4("box color", config_system.item.clr_box, ImGuiColorEditFlags_NoInputs);
  249. ImGui::Checkbox("health", &config_system.item.player_health);
  250. ImGui::Checkbox("weapon", &config_system.item.player_weapon);
  251. ImGui::ColorEdit4("weapon color", config_system.item.clr_weapon, ImGuiColorEditFlags_NoInputs);
  252.  
  253. ImGui::PushStyleColor(ImGuiCol_Text, config_system.item.visuals_enabled ? ImVec4(1.f, 1.f, 1.f, 1) : ImVec4(.6f, .6f, .6f, 1));
  254. if (ImGui::BeginCombo("flags", "...", ImVec2(0, 105))) {
  255. ImGui::SetCursorPosY(ImGui::GetCursorPosY() - 8);
  256. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 4);
  257. ImGui::Selectable(("armor"), &config_system.item.player_flags_armor, ImGuiSelectableFlags_::ImGuiSelectableFlags_DontClosePopups);
  258. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 4);
  259. ImGui::Selectable(("bomb"), &config_system.item.player_flags_c4, ImGuiSelectableFlags_::ImGuiSelectableFlags_DontClosePopups);
  260. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 4);
  261. ImGui::Selectable(("flashed"), &config_system.item.player_flags_flashed, ImGuiSelectableFlags_::ImGuiSelectableFlags_DontClosePopups);
  262. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 4);
  263. ImGui::Selectable(("money"), &config_system.item.player_flags_money, ImGuiSelectableFlags_::ImGuiSelectableFlags_DontClosePopups);
  264. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 4);
  265. ImGui::Selectable(("scoped"), &config_system.item.player_flags_scoped, ImGuiSelectableFlags_::ImGuiSelectableFlags_DontClosePopups);
  266.  
  267. ImGui::EndCombo();
  268. }
  269. ImGui::PopStyleColor();
  270. ImGui::Checkbox("sound esp", &config_system.item.sound_footstep);
  271. ImGui::ColorEdit4("sound esp color", config_system.item.clr_footstep, ImGuiColorEditFlags_NoInputs);
  272. ImGui::Checkbox("skeleton", &config_system.item.skeleton);
  273. ImGui::Checkbox("preview visuals", &config_system.item.visuals_preview);
  274. }
  275. ImGui::EndChild(true);
  276.  
  277. ImGui::PopStyleVar();
  278. ImGui::Dummy(ImVec2(0, -2)); ImGui::SameLine();
  279. ImGui::Dummy(ImVec2(0, 0)); ImGui::SameLine();
  280. ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(16, 16));
  281.  
  282. ImGui::BeginChild("effects", ImVec2(279, 267), true); {
  283. ImGui::Checkbox("force crosshair", &config_system.item.force_crosshair);
  284. ImGui::Checkbox("modulate crosshair color", &config_system.item.crosshair_color);
  285. ImGui::ColorEdit4("##crosshair color", config_system.item.clr_crosshair, ImGuiColorEditFlags_NoInputs);
  286. ImGui::Checkbox("modulate crosshair outline color", &config_system.item.crosshair_outline_color);
  287. ImGui::ColorEdit4("##crosshair outline color", config_system.item.clr_crosshair_outline, ImGuiColorEditFlags_NoInputs);
  288.  
  289. ImGui::PushStyleColor(ImGuiCol_Text, config_system.item.visuals_enabled ? ImVec4(1.f, 1.f, 1.f, 1) : ImVec4(.6f, .6f, .6f, 1));
  290. ImGui::SliderInt("viewmodel field of view", &config_system.item.viewmodel_fov, 0, 135);
  291. ImGui::SliderInt("field of view", &config_system.item.fov, 0, 60);
  292. ImGui::PopStyleColor();
  293. ImGui::Checkbox("night mode", &config_system.item.nightmode);
  294. ImGui::ColorEdit4("sky color", config_system.item.clr_sky, ImGuiColorEditFlags_NoInputs);
  295. if (config_system.item.nightmode) {
  296. ImGui::SliderInt("brightness", &config_system.item.nightmode_brightness, 0, 100);
  297. }
  298.  
  299. ImGui::PushStyleColor(ImGuiCol_Text, config_system.item.visuals_enabled ? ImVec4(1.f, 1.f, 1.f, 1) : ImVec4(.6f, .6f, .6f, 1));
  300. if (ImGui::BeginCombo("removals", "...", ImVec2(0, 105))) {
  301. ImGui::SetCursorPosY(ImGui::GetCursorPosY() - 8);
  302. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 4);
  303. ImGui::Selectable(("smoke"), &config_system.item.remove_smoke, ImGuiSelectableFlags_::ImGuiSelectableFlags_DontClosePopups);
  304. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 4);
  305. ImGui::Selectable(("flash"), &config_system.item.reduce_flash, ImGuiSelectableFlags_::ImGuiSelectableFlags_DontClosePopups);
  306. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 4);
  307. ImGui::Selectable(("sleeves"), &config_system.item.remove_sleeves, ImGuiSelectableFlags_::ImGuiSelectableFlags_DontClosePopups);
  308. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 4);
  309. ImGui::Selectable(("hands"), &config_system.item.remove_hands, ImGuiSelectableFlags_::ImGuiSelectableFlags_DontClosePopups);
  310. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 4);
  311. ImGui::Selectable(("scope overlay"), &config_system.item.remove_scope, ImGuiSelectableFlags_::ImGuiSelectableFlags_DontClosePopups);
  312. ImGui::EndCombo();
  313. }
  314.  
  315. if (ImGui::BeginCombo("world", "...", ImVec2(0, 105))) {
  316. ImGui::SetCursorPosY(ImGui::GetCursorPosY() - 8);
  317. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 4);
  318. ImGui::Selectable(("planted bomb"), &config_system.item.bomb_planted, ImGuiSelectableFlags_::ImGuiSelectableFlags_DontClosePopups);
  319. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 4);
  320. ImGui::Selectable(("dropped weapons"), &config_system.item.dropped_weapons, ImGuiSelectableFlags_::ImGuiSelectableFlags_DontClosePopups);
  321. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 4);
  322. ImGui::Selectable(("projectiles"), &config_system.item.projectiles, ImGuiSelectableFlags_::ImGuiSelectableFlags_DontClosePopups);
  323. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 4);
  324. ImGui::Selectable(("misc entities"), &config_system.item.entity_esp, ImGuiSelectableFlags_::ImGuiSelectableFlags_DontClosePopups);
  325. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 4);
  326. ImGui::Selectable(("danger zone"), &config_system.item.danger_zone_dropped, ImGuiSelectableFlags_::ImGuiSelectableFlags_DontClosePopups);
  327. ImGui::EndCombo();
  328. }
  329. ImGui::PopStyleColor();
  330. }
  331. ImGui::EndChild(true);
  332.  
  333. ImGui::NextColumn();
  334.  
  335. ImGui::BeginChild("glow", ImVec2(279, 268), true); {
  336. ImGui::Checkbox("active", &config_system.item.visuals_glow);
  337. ImGui::Checkbox("enemy", &config_system.item.visuals_glow_enemy);
  338. ImGui::ColorEdit4("glow color", config_system.item.clr_glow, ImGuiColorEditFlags_NoInputs);
  339. ImGui::Checkbox("teammate", &config_system.item.visuals_glow_team);
  340. ImGui::ColorEdit4("glow color team", config_system.item.clr_glow_team, ImGuiColorEditFlags_NoInputs);
  341. ImGui::Checkbox("planted bomb", &config_system.item.visuals_glow_planted);
  342. ImGui::ColorEdit4("glow color planted", config_system.item.clr_glow_planted, ImGuiColorEditFlags_NoInputs);
  343. ImGui::Checkbox("dropped weapons", &config_system.item.visuals_glow_weapons);
  344. ImGui::ColorEdit4("glow color weapons", config_system.item.clr_glow_dropped, ImGuiColorEditFlags_NoInputs);
  345.  
  346. }
  347. ImGui::EndChild(true);
  348.  
  349. ImGui::Spacing();
  350.  
  351. ImGui::SetCursorPosY(ImGui::GetCursorPosY() - 8);
  352.  
  353. ImGui::BeginChild("chams", ImVec2(279, 267), true); {
  354. ImGui::PushStyleColor(ImGuiCol_Text, config_system.item.visuals_enabled ? ImVec4(1.f, 1.f, 1.f, 1) : ImVec4(.6f, .6f, .6f, 1));
  355. ImGui::Combo("chams type", &config_system.item.vis_chams_type, "textured\0flat\0metallic\0pulsating");
  356. ImGui::PopStyleColor();
  357. ImGui::Checkbox("enemy", &config_system.item.vis_chams_vis);
  358. ImGui::ColorEdit4("enemy color", config_system.item.clr_chams_vis, ImGuiColorEditFlags_NoInputs);
  359. ImGui::Checkbox("enemy (behind wall)", &config_system.item.vis_chams_invis);
  360. ImGui::ColorEdit4("enemy (behind wall) color", config_system.item.clr_chams_invis, ImGuiColorEditFlags_NoInputs);
  361.  
  362. ImGui::Checkbox("teammate", &config_system.item.vis_chams_vis_teammate);
  363. ImGui::ColorEdit4("teammate color", config_system.item.clr_chams_vis_teammate, ImGuiColorEditFlags_NoInputs);
  364. ImGui::Checkbox("teammate (behind wall)", &config_system.item.vis_chams_invis_teammate);
  365. ImGui::ColorEdit4("teammate (behind wall) color", config_system.item.clr_chams_invis_teammate, ImGuiColorEditFlags_NoInputs);
  366.  
  367. #ifdef debug_build
  368.  
  369. ImGui::Checkbox("backtrack", &config_system.item.backtrack_chams);
  370. #endif
  371. ImGui::Checkbox("smoke check", &config_system.item.vis_chams_smoke_check);
  372. }
  373. ImGui::EndChild(true);
  374.  
  375. ImGui::PopStyleVar();
  376. ImGui::PopStyleColor();
  377. ImGui::PopStyleColor();
  378. ImGui::Columns();
  379. break;
  380. case 2:
  381. ImGui::Columns(2, NULL, false);
  382. ImGui::Dummy(ImVec2(0, -2)); ImGui::SameLine();
  383. ImGui::Dummy(ImVec2(0, 0)); ImGui::SameLine();
  384. ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(16, 16));
  385. ImGui::PushStyleColor(ImGuiCol_ChildWindowBg, ImVec4(30 / 255.f, 30 / 255.f, 39 / 255.f, 1.0f));
  386. ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0 / 255.f, 0 / 255.f, 0 / 255.f, 0.1f));
  387.  
  388. ImGui::BeginChild("misc", ImVec2(279, 543), true); {
  389. ImGui::Checkbox("active", &config_system.item.misc_enabled);
  390. ImGui::Checkbox("clantag spammer", &config_system.item.clan_tag);
  391. ImGui::Checkbox("engine radar", &config_system.item.radar);
  392.  
  393. ImGui::PushStyleColor(ImGuiCol_Text, config_system.item.misc_enabled ? ImVec4(1.f, 1.f, 1.f, 1) : ImVec4(.6f, .6f, .6f, 1));
  394. if (ImGui::BeginCombo("logs", "...", ImVec2(0, 65))) {
  395. ImGui::SetCursorPosY(ImGui::GetCursorPosY() - 8);
  396. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 4);
  397. ImGui::Selectable(("player hurt"), &config_system.item.logs_player_hurt, ImGuiSelectableFlags_::ImGuiSelectableFlags_DontClosePopups);
  398. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 4);
  399. ImGui::Selectable(("player bought"), &config_system.item.logs_player_bought, ImGuiSelectableFlags_::ImGuiSelectableFlags_DontClosePopups);
  400. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 4);
  401. ImGui::Selectable(("config system"), &config_system.item.logs_config_system, ImGuiSelectableFlags_::ImGuiSelectableFlags_DontClosePopups);
  402. ImGui::EndCombo();
  403. }
  404. ImGui::PopStyleColor();
  405.  
  406. ImGui::Checkbox("hitmarker", &config_system.item.hitmarker);
  407. if (config_system.item.hitmarker) {
  408. ImGui::Combo("hitmarker sound", &config_system.item.hitmarker_sound, "none\0firts\0second\0third");
  409. }
  410. ImGui::Checkbox("anti screenshot", &config_system.item.anti_screenshot);
  411. ImGui::Checkbox("spectators", &config_system.item.spectators_list);
  412. ImGui::Checkbox("watermark", &config_system.item.watermark);
  413. ImGui::Checkbox("disable post processing", &config_system.item.disable_post_processing);
  414. ImGui::Checkbox("recoil crosshair", &config_system.item.recoil_crosshair);
  415. ImGui::Checkbox("rank reveal", &config_system.item.rank_reveal);
  416.  
  417. ImGui::Checkbox("viewmodel offset", &config_system.item.viewmodel_offset);
  418. if (config_system.item.viewmodel_offset) {
  419. ImGui::SliderInt("viewmodel x", &config_system.item.viewmodel_x, -10, 10);
  420. ImGui::SliderInt("viewmodel y", &config_system.item.viewmodel_y, -10, 10);
  421. ImGui::SliderInt("viewmodel z", &config_system.item.viewmodel_z, -10, 10);
  422.  
  423. }
  424.  
  425. ImGui::PushStyleColor(ImGuiCol_Text, config_system.item.misc_enabled ? ImVec4(1.f, 1.f, 1.f, 1) : ImVec4(.6f, .6f, .6f, 1));
  426. ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 18);
  427. if (ImGui::Button("dump steam id", ImVec2(84, 18))) {
  428. utilities::dump_steam_id();
  429. }
  430.  
  431. ImGui::SameLine();
  432. if (ImGui::Button("hide name", ImVec2(84, 18))) {
  433. utilities::change_name("\n\xAD\xAD\xAD");
  434. }
  435. ImGui::PopStyleColor();
  436.  
  437. }
  438. ImGui::EndChild(true);
  439. ImGui::NextColumn();
  440.  
  441. ImGui::BeginChild("movement", ImVec2(279, 543), true); {
  442. ImGui::Checkbox("bunny hop", &config_system.item.bunny_hop);
  443. if (config_system.item.bunny_hop) {
  444. ImGui::SliderInt("hitchance", &config_system.item.bunny_hop_hitchance, 0, 100);
  445. ImGui::SliderInt("minimum hops", &config_system.item.bunny_hop_minimum_value, 0, 20);
  446. ImGui::SliderInt("maximum hops", &config_system.item.bunny_hop_maximum_value, 0, 20);
  447. }
  448.  
  449.  
  450. ImGui::Checkbox("edge jump", &config_system.item.edge_jump);
  451. if (config_system.item.edge_jump) {
  452. ImGui::Checkbox("duck in air", &config_system.item.edge_jump_duck_in_air);
  453. }
  454. }
  455. ImGui::EndChild(true);
  456. ImGui::PopStyleVar();
  457. ImGui::PopStyleColor();
  458. ImGui::PopStyleColor();
  459. ImGui::Columns();
  460. break;
  461. case 3:
  462. ImGui::Columns(2, NULL, false);
  463. ImGui::Dummy(ImVec2(0, -2)); ImGui::SameLine();
  464. ImGui::Dummy(ImVec2(0, 0)); ImGui::SameLine();
  465. ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(16, 16));
  466. ImGui::PushStyleColor(ImGuiCol_ChildWindowBg, ImVec4(30 / 255.f, 30 / 255.f, 39 / 255.f, 1.0f));
  467. ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0 / 255.f, 0 / 255.f, 0 / 255.f, 0.1f));
  468. ImGui::BeginChild("knife", ImVec2(279, 268), true); {
  469. ImGui::Checkbox("enable", &config_system.item.skinchanger_enable);
  470. ImGui::PushStyleColor(ImGuiCol_Text, config_system.item.skinchanger_enable ? ImVec4(1.f, 1.f, 1.f, 1) : ImVec4(.6f, .6f, .6f, 1));
  471. ImGui::Combo("knife", &config_system.item.knife_model, "default\0bayonet\0m9\0karambit\0bowie\0butterfly\0falchion\0flip\0gut\0huntsman\0shaddow daggers\0navaja\0stiletto\0talon\0ursus");
  472. ImGui::Combo("condition", &config_system.item.knife_wear, "factory new\0minimal wear\0field-tested\0well-worn\0battle-scarred");
  473.  
  474. ImGui::Combo(("skin"), &config_system.item.paint_kit_vector_index_knife, [](void* data, int idx, const char** out_text) {
  475. *out_text = parser_skins[idx].name.c_str();
  476. return true;
  477. }, nullptr, parser_skins.size(), 10);
  478. config_system.item.paint_kit_index_knife = parser_skins[config_system.item.paint_kit_vector_index_knife].id;
  479. ImGui::PopStyleColor();
  480.  
  481. ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 18);
  482. if (ImGui::Button("force update", ImVec2(84, 18))) {
  483. utilities::force_update();
  484. }
  485.  
  486. }
  487. ImGui::EndChild(true);
  488.  
  489. ImGui::PopStyleVar();
  490. ImGui::Dummy(ImVec2(0, -2)); ImGui::SameLine();
  491. ImGui::Dummy(ImVec2(0, 0)); ImGui::SameLine();
  492. ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(16, 16));
  493.  
  494. ImGui::BeginChild("gloves", ImVec2(279, 267), true); {
  495. ImGui::Checkbox("enable", &config_system.item.glovechanger_enable);
  496. ImGui::PushStyleColor(ImGuiCol_Text, config_system.item.glovechanger_enable ? ImVec4(1.f, 1.f, 1.f, 1) : ImVec4(.6f, .6f, .6f, 1));
  497. ImGui::Combo("type", &config_system.item.glove_model, "default\0blood\0sport\0slick\0leather\0moto\0specin\0hydra");
  498. ImGui::Combo(("skin"), &config_system.item.paint_kit_vector_index_glove, [](void* data, int idx, const char** out_text) {
  499. *out_text = parser_gloves[idx].name.c_str();
  500. return true;
  501. }, nullptr, parser_gloves.size(), 10);
  502. config_system.item.paint_kit_index_glove = parser_gloves[config_system.item.paint_kit_vector_index_glove].id;
  503. ImGui::Combo("condition", &config_system.item.glove_wear, "factory new\0minimal wear\0field-tested\0well-worn\0battle-scarred");
  504. ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 18);
  505. if (ImGui::Button("force update", ImVec2(84, 18))) {
  506. utilities::force_update();
  507. }
  508. ImGui::PopStyleColor();
  509.  
  510. }
  511. ImGui::EndChild(true);
  512.  
  513. ImGui::NextColumn();
  514.  
  515. ImGui::BeginChild("weapons", ImVec2(279, 543), true); {
  516. static int weapons_page = 0;
  517. if (ImGui::ButtonT("pistol", ImVec2(50, 30), weapons_page, 0, false, ImColor(0, 0, 0))) weapons_page = 0; ImGui::SameLine(0, 0);
  518. if (ImGui::ButtonT("rifle", ImVec2(50, 30), weapons_page, 1, false, false)) weapons_page = 1; ImGui::SameLine(0, 0);
  519. if (ImGui::ButtonT("sniper", ImVec2(50, 30), weapons_page, 2, false, false)) weapons_page = 2; ImGui::SameLine(0, 0);
  520. if (ImGui::ButtonT("smg", ImVec2(50, 30), weapons_page, 3, false, false)) weapons_page = 3; ImGui::SameLine(0, 0);
  521. if (ImGui::ButtonT("heavy", ImVec2(50, 30), weapons_page, 4, false, false)) weapons_page = 4;
  522.  
  523. ImGui::PushStyleColor(ImGuiCol_Text, config_system.item.skinchanger_enable ? ImVec4(1.f, 1.f, 1.f, 1) : ImVec4(.6f, .6f, .6f, 1));
  524. switch (weapons_page) {
  525. case 0:
  526. ImGui::Combo(("p2000"), &config_system.item.paint_kit_vector_index_p2000, [](void* data, int idx, const char** out_text) {
  527. *out_text = parser_skins[idx].name.c_str();
  528. return true;
  529. }, nullptr, parser_skins.size(), 10);
  530. config_system.item.paint_kit_index_p2000 = parser_skins[config_system.item.paint_kit_vector_index_p2000].id;
  531.  
  532.  
  533. ImGui::Combo(("usp-s"), &config_system.item.paint_kit_vector_index_usp, [](void* data, int idx, const char** out_text) {
  534. *out_text = parser_skins[idx].name.c_str();
  535. return true;
  536. }, nullptr, parser_skins.size(), 10);
  537. config_system.item.paint_kit_index_usp = parser_skins[config_system.item.paint_kit_vector_index_usp].id;
  538.  
  539. ImGui::Combo(("glock"), &config_system.item.paint_kit_vector_index_glock, [](void* data, int idx, const char** out_text) {
  540. *out_text = parser_skins[idx].name.c_str();
  541. return true;
  542. }, nullptr, parser_skins.size(), 10);
  543. config_system.item.paint_kit_index_glock = parser_skins[config_system.item.paint_kit_vector_index_glock].id;
  544.  
  545. ImGui::Combo(("p250"), &config_system.item.paint_kit_vector_index_p250, [](void* data, int idx, const char** out_text) {
  546. *out_text = parser_skins[idx].name.c_str();
  547. return true;
  548. }, nullptr, parser_skins.size(), 10);
  549. config_system.item.paint_kit_index_p250 = parser_skins[config_system.item.paint_kit_vector_index_p250].id;
  550.  
  551. ImGui::Combo(("five-seven"), &config_system.item.paint_kit_vector_index_fiveseven, [](void* data, int idx, const char** out_text) {
  552. *out_text = parser_skins[idx].name.c_str();
  553. return true;
  554. }, nullptr, parser_skins.size(), 10);
  555. config_system.item.paint_kit_index_fiveseven = parser_skins[config_system.item.paint_kit_vector_index_fiveseven].id;
  556.  
  557. ImGui::Combo(("tec9"), &config_system.item.paint_kit_vector_index_tec, [](void* data, int idx, const char** out_text) {
  558. *out_text = parser_skins[idx].name.c_str();
  559. return true;
  560. }, nullptr, parser_skins.size(), 10);
  561. config_system.item.paint_kit_index_tec = parser_skins[config_system.item.paint_kit_vector_index_tec].id;
  562.  
  563. ImGui::Combo(("cz75a"), &config_system.item.paint_kit_vector_index_cz, [](void* data, int idx, const char** out_text) {
  564. *out_text = parser_skins[idx].name.c_str();
  565. return true;
  566. }, nullptr, parser_skins.size(), 10);
  567. config_system.item.paint_kit_index_cz = parser_skins[config_system.item.paint_kit_vector_index_cz].id;
  568.  
  569. ImGui::Combo(("duals"), &config_system.item.paint_kit_vector_index_duals, [](void* data, int idx, const char** out_text) {
  570. *out_text = parser_skins[idx].name.c_str();
  571. return true;
  572. }, nullptr, parser_skins.size(), 10);
  573. config_system.item.paint_kit_index_duals = parser_skins[config_system.item.paint_kit_vector_index_duals].id;
  574.  
  575. ImGui::Combo(("deagle"), &config_system.item.paint_kit_vector_index_deagle, [](void* data, int idx, const char** out_text) {
  576. *out_text = parser_skins[idx].name.c_str();
  577. return true;
  578. }, nullptr, parser_skins.size(), 10);
  579. config_system.item.paint_kit_index_deagle = parser_skins[config_system.item.paint_kit_vector_index_deagle].id;
  580.  
  581. ImGui::Combo(("revolver"), &config_system.item.paint_kit_vector_index_revolver, [](void* data, int idx, const char** out_text) {
  582. *out_text = parser_skins[idx].name.c_str();
  583. return true;
  584. }, nullptr, parser_skins.size(), 10);
  585. config_system.item.paint_kit_index_revolver = parser_skins[config_system.item.paint_kit_vector_index_revolver].id;
  586.  
  587. break;
  588. case 1:
  589. ImGui::Combo(("famas"), &config_system.item.paint_kit_vector_index_famas, [](void* data, int idx, const char** out_text) {
  590. *out_text = parser_skins[idx].name.c_str();
  591. return true;
  592. }, nullptr, parser_skins.size(), 10);
  593. config_system.item.paint_kit_index_famas = parser_skins[config_system.item.paint_kit_vector_index_famas].id;
  594.  
  595. ImGui::Combo(("galil"), &config_system.item.paint_kit_vector_index_galil, [](void* data, int idx, const char** out_text) {
  596. *out_text = parser_skins[idx].name.c_str();
  597. return true;
  598. }, nullptr, parser_skins.size(), 10);
  599. config_system.item.paint_kit_index_galil = parser_skins[config_system.item.paint_kit_vector_index_galil].id;
  600.  
  601. ImGui::Combo(("m4a4"), &config_system.item.paint_kit_vector_index_m4a4, [](void* data, int idx, const char** out_text) {
  602. *out_text = parser_skins[idx].name.c_str();
  603. return true;
  604. }, nullptr, parser_skins.size(), 10);
  605. config_system.item.paint_kit_index_m4a4 = parser_skins[config_system.item.paint_kit_vector_index_m4a4].id;
  606.  
  607. ImGui::Combo(("m4a1"), &config_system.item.paint_kit_vector_index_m4a1, [](void* data, int idx, const char** out_text) {
  608. *out_text = parser_skins[idx].name.c_str();
  609. return true;
  610. }, nullptr, parser_skins.size(), 10);
  611. config_system.item.paint_kit_index_m4a1 = parser_skins[config_system.item.paint_kit_vector_index_m4a1].id;
  612.  
  613. ImGui::Combo(("ak47"), &config_system.item.paint_kit_vector_index_ak47, [](void* data, int idx, const char** out_text) {
  614. *out_text = parser_skins[idx].name.c_str();
  615. return true;
  616. }, nullptr, parser_skins.size(), 10);
  617. config_system.item.paint_kit_index_ak47 = parser_skins[config_system.item.paint_kit_vector_index_ak47].id;
  618.  
  619. ImGui::Combo(("sg 553"), &config_system.item.paint_kit_vector_index_sg553, [](void* data, int idx, const char** out_text) {
  620. *out_text = parser_skins[idx].name.c_str();
  621. return true;
  622. }, nullptr, parser_skins.size(), 10);
  623. config_system.item.paint_kit_index_sg553 = parser_skins[config_system.item.paint_kit_vector_index_sg553].id;
  624.  
  625. ImGui::Combo(("aug"), &config_system.item.paint_kit_vector_index_aug, [](void* data, int idx, const char** out_text) {
  626. *out_text = parser_skins[idx].name.c_str();
  627. return true;
  628. }, nullptr, parser_skins.size(), 10);
  629. config_system.item.paint_kit_index_aug = parser_skins[config_system.item.paint_kit_vector_index_aug].id;
  630.  
  631. break;
  632. case 2:
  633. ImGui::Combo(("ssg08"), &config_system.item.paint_kit_vector_index_ssg08, [](void* data, int idx, const char** out_text) {
  634. *out_text = parser_skins[idx].name.c_str();
  635. return true;
  636. }, nullptr, parser_skins.size(), 10);
  637. config_system.item.paint_kit_index_ssg08 = parser_skins[config_system.item.paint_kit_vector_index_ssg08].id;
  638.  
  639. ImGui::Combo(("awp"), &config_system.item.paint_kit_vector_index_awp, [](void* data, int idx, const char** out_text) {
  640. *out_text = parser_skins[idx].name.c_str();
  641. return true;
  642. }, nullptr, parser_skins.size(), 10);
  643. config_system.item.paint_kit_index_awp = parser_skins[config_system.item.paint_kit_vector_index_awp].id;
  644.  
  645. ImGui::Combo(("scar20"), &config_system.item.paint_kit_vector_index_scar, [](void* data, int idx, const char** out_text) {
  646. *out_text = parser_skins[idx].name.c_str();
  647. return true;
  648. }, nullptr, parser_skins.size(), 10);
  649. config_system.item.paint_kit_index_scar = parser_skins[config_system.item.paint_kit_vector_index_scar].id;
  650.  
  651. ImGui::Combo(("g3sg1"), &config_system.item.paint_kit_vector_index_g3sg1, [](void* data, int idx, const char** out_text) {
  652. *out_text = parser_skins[idx].name.c_str();
  653. return true;
  654. }, nullptr, parser_skins.size(), 10);
  655. config_system.item.paint_kit_index_g3sg1 = parser_skins[config_system.item.paint_kit_vector_index_g3sg1].id;
  656.  
  657. break;
  658. case 3:
  659. break;
  660. case 4:
  661. break;
  662.  
  663. }
  664. ImGui::PopStyleColor();
  665. }
  666. ImGui::EndChild(true);
  667. ImGui::PopStyleVar();
  668. ImGui::PopStyleColor();
  669. ImGui::PopStyleColor();
  670. ImGui::Columns();
  671. break;
  672.  
  673. case 4:
  674. ImGui::Columns(2, NULL, false);
  675. ImGui::Dummy(ImVec2(0, -2)); ImGui::SameLine();
  676. ImGui::Dummy(ImVec2(0, 0)); ImGui::SameLine();
  677. ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(16, 16));
  678. ImGui::PushStyleColor(ImGuiCol_ChildWindowBg, ImVec4(30 / 255.f, 30 / 255.f, 39 / 255.f, 1.0f));
  679. ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0 / 255.f, 0 / 255.f, 0 / 255.f, 0.1f));
  680. ImGui::BeginChild("config", ImVec2(279, 268), true); {
  681. constexpr auto& config_items = config_system.get_configs();
  682. static int current_config = -1;
  683.  
  684. if (static_cast<size_t>(current_config) >= config_items.size())
  685. current_config = -1;
  686.  
  687. static char buffer[16];
  688.  
  689. if (ImGui::ListBox("", &current_config, [](void* data, int idx, const char** out_text) {
  690. auto& vector = *static_cast<std::vector<std::string>*>(data);
  691. *out_text = vector[idx].c_str();
  692. return true;
  693. }, & config_items, config_items.size(), 5) && current_config != -1)
  694. strcpy(buffer, config_items[current_config].c_str());
  695.  
  696. ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 18);
  697. ImGui::PushID(0);
  698. ImGui::PushItemWidth(178);
  699. if (ImGui::InputText("", buffer, IM_ARRAYSIZE(buffer), ImGuiInputTextFlags_EnterReturnsTrue)) {
  700. if (current_config != -1)
  701. config_system.rename(current_config, buffer);
  702. }
  703. ImGui::PopID();
  704. ImGui::NextColumn();
  705.  
  706. ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 18);
  707. if (ImGui::Button(("create"), ImVec2(85, 20))) {
  708. config_system.add(buffer);
  709. }
  710.  
  711. ImGui::SameLine();
  712.  
  713. if (ImGui::Button(("reset"), ImVec2(85, 20))) {
  714. config_system.reset();
  715. }
  716.  
  717. ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 18);
  718. if (current_config != -1) {
  719. if (ImGui::Button(("load"), ImVec2(85, 20))) {
  720. config_system.load(current_config);
  721.  
  722. load_config = true;
  723.  
  724. if (config_system.item.logs_config_system) {
  725. utilities::console_warning("[config system] ");
  726. interfaces::console->console_printf(config_items[current_config].c_str());
  727. interfaces::console->console_printf(" loaded. \n");
  728. std::stringstream ss;
  729. ss << config_items[current_config].c_str() << " loaded.";
  730. event_logs.add(ss.str(), color(167, 255, 255, 255));
  731. }
  732.  
  733. }
  734.  
  735. ImGui::SameLine();
  736.  
  737. if (ImGui::Button(("save"), ImVec2(85, 20))) {
  738. config_system.save(current_config);
  739.  
  740. save_config = true;
  741.  
  742. if (config_system.item.logs_config_system) {
  743. utilities::console_warning("[config system] ");
  744. interfaces::console->console_printf(config_items[current_config].c_str());
  745. interfaces::console->console_printf(" saved. \n");
  746. std::stringstream ss;
  747. ss << config_items[current_config].c_str() << " saved.";
  748. event_logs.add(ss.str(), color(167, 255, 255, 255));
  749. }
  750.  
  751. }
  752.  
  753. ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 18);
  754. if (ImGui::Button(("remove"), ImVec2(85, 20))) {
  755. config_system.remove(current_config);
  756. }
  757. }
  758. }
  759. ImGui::EndChild(true);
  760.  
  761. ImGui::PopStyleVar();
  762. ImGui::Dummy(ImVec2(0, -2)); ImGui::SameLine();
  763. ImGui::Dummy(ImVec2(0, 0)); ImGui::SameLine();
  764. ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(16, 16));
  765.  
  766. ImGui::BeginChild("settings", ImVec2(279, 267), true); {
  767. ImGui::Combo("keybinds", &config_system.item.keybinds_selection, "edge jump\0aimbot key\0visuals key");
  768.  
  769. if (config_system.item.keybinds_selection == 0) {
  770. ImGui::Hotkey("##edge jump key", &config_system.item.edge_jump_key, ImVec2(100, 20));
  771. }
  772.  
  773. else if (config_system.item.keybinds_selection == 1) {
  774. ImGui::Hotkey("##aimbot key", &config_system.item.aim_key, ImVec2(100, 20));
  775. }
  776.  
  777. else if (config_system.item.keybinds_selection == 2) {
  778. ImGui::Hotkey("##visuals key", &config_system.item.visuals_key, ImVec2(100, 20));
  779. }
  780. }
  781. ImGui::EndChild(true);
  782.  
  783. ImGui::NextColumn();
  784.  
  785. ImGui::BeginChild("info", ImVec2(279, 543), true); {
  786. char buffer[UNLEN + 1];
  787. DWORD size;
  788. size = sizeof(buffer);
  789. GetUserName(buffer, &size);
  790. char title[UNLEN];
  791. char ch1[25] = "welcome, ";
  792. char *ch = strcat(ch1, buffer);
  793.  
  794. ImGui::Text(ch);
  795. ImGui::Text("build: " __DATE__ " / " __TIME__);
  796. if (std::strstr(GetCommandLineA(), "-insecure")) {
  797. ImGui::Text("insecure mode!");
  798. }
  799. }
  800. ImGui::EndChild(true);
  801. ImGui::PopStyleVar();
  802. ImGui::PopStyleColor();
  803. ImGui::PopStyleColor();
  804. ImGui::Columns();
  805. break;
  806. }
  807. }
  808.  
  809. ImGui::PopFont();
  810.  
  811. ImGui::End();
  812. }
  813. }
  814.  
  815. void c_menu::run_popup() {
  816. ImGui::PushFont(font_menu);
  817. ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(16, 16));
  818. ImGui::PushStyleColor(ImGuiCol_ChildWindowBg, ImVec4(30 / 255.f, 30 / 255.f, 39 / 255.f, 1.0f));
  819. ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0 / 255.f, 0 / 255.f, 0 / 255.f, 0.1f));
  820.  
  821. if (save_config) {
  822. bool done = false;
  823. ImGui::begin_popup("config saved.", 2000, &done);
  824. if (done)
  825. save_config = false;
  826. }
  827.  
  828. if (load_config) {
  829. bool done = false;
  830. ImGui::begin_popup("config loaded.", 2000, &done);
  831. if (done)
  832. load_config = false;
  833. }
  834.  
  835. ImGui::PopStyleColor();
  836. ImGui::PopStyleColor();
  837. ImGui::PopStyleVar();
  838. ImGui::PopFont();
  839. }
  840.  
  841. void c_menu::run_visuals_preview() {
  842. static std::vector<esp_info_s> info;
  843. static bool enabled = true;
  844.  
  845. ImGui::SetNextWindowSize(ImVec2(235, 400));
  846.  
  847. ImGui::Begin("ESP Preview", &enabled, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_ShowBorders | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoTitleBar); {
  848. const auto cur_window = ImGui::GetCurrentWindow();
  849. const ImVec2 w_pos = cur_window->Pos;
  850.  
  851. ImVec2 p = ImGui::GetCursorScreenPos();
  852. ImColor c = ImColor(32, 114, 247);
  853.  
  854. //title bar
  855. ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(p.x - 20, p.y + 15), ImVec2(p.x + ImGui::GetWindowWidth(), p.y - 40), ImColor(30, 30, 39));
  856.  
  857. //draw gradient bellow title bar
  858. ImGui::GetWindowDrawList()->AddRectFilledMultiColor(ImVec2(p.x - 20, p.y + 14), ImVec2(p.x + ImGui::GetWindowWidth(), p.y + 16), ImColor(167, 24, 71, 255), ImColor(58, 31, 87, 255), ImColor(58, 31, 87, 255), ImColor(167, 24, 71, 255));
  859.  
  860. ImGui::SetCursorPosY(ImGui::GetCursorPosY() - 9); //góra, dół
  861. ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 8); //lewo prawo
  862. //render cheat name
  863. ImGui::Text("visuals preview");
  864.  
  865.  
  866. if (config_system.item.player_box) {
  867. cur_window->DrawList->AddRect(ImVec2(w_pos.x + 40, w_pos.y + 60), ImVec2(w_pos.x + 200, w_pos.y + 360), ImGui::GetColorU32(ImGuiCol_Text));
  868. }
  869.  
  870. if (config_system.item.player_health)
  871. cur_window->DrawList->AddRectFilled(ImVec2(w_pos.x + 34, w_pos.y + 60), ImVec2(w_pos.x + 36, w_pos.y + 360), ImGui::GetColorU32(ImVec4(83 / 255.f, 200 / 255.f, 84 / 255.f, 255 / 255.f)));
  872.  
  873. if (config_system.item.player_name)
  874. info.emplace_back(esp_info_s("name", color(255, 255, 255, 255), CENTER_UP));
  875.  
  876. if (config_system.item.player_weapon)
  877. info.emplace_back(esp_info_s("awp", color(255, 255, 255, 255), CENTER_DOWN));
  878.  
  879. if (config_system.item.player_flags_armor)
  880. info.emplace_back(esp_info_s("hk", color(255, 255, 255, 255), RIGHT));
  881.  
  882.  
  883. for (auto render : info) {
  884. const auto text_size = ImGui::CalcTextSize(render.f_name.c_str());
  885.  
  886. auto pos = ImVec2(w_pos.x + 205, w_pos.y + 60);
  887.  
  888. if (render.f_position == CENTER_DOWN) {
  889. pos = ImVec2(w_pos.x + (240 / 2) - text_size.x / 2, pos.y + 315 - text_size.y);
  890. }
  891. else if (render.f_position == CENTER_UP) {
  892. pos = ImVec2(w_pos.x + (240 / 2) - text_size.x / 2, pos.y - 5 - text_size.y);
  893. }
  894.  
  895. cur_window->DrawList->AddText(pos, ImGui::GetColorU32(ImVec4(255 / 255.f, 255 / 255.f, 255 / 255.f, 255 / 255.f)), render.f_name.c_str());
  896. }
  897. }
  898. ImGui::End();
  899.  
  900. info.clear();
  901. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement