Advertisement
Guest User

Untitled

a guest
Dec 16th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.19 KB | None | 0 0
  1. #include "..\includes.hpp"
  2.  
  3. #define rgba_to_float(r,g,b,a) (float)r/255.0f, (float)g/255.0f, (float)b/255.0f, (float)a/255.0f
  4.  
  5. bool new_menu::m_init = false;
  6.  
  7. ImFont* new_menu::Default = nullptr;
  8. ImFont* new_menu::Logo = nullptr;
  9. ImFont* new_menu::Default_bold = nullptr;
  10. ImFont* new_menu::Default_bold2 = nullptr;
  11.  
  12. namespace ImGui
  13. {
  14. static auto vector_getter = [](void* vec, int idx, const char** out_text)
  15. {
  16. auto& vector = *static_cast<std::vector<std::string>*>(vec);
  17. if (idx < 0 || idx >= static_cast<int>(vector.size())) { return false; }
  18. *out_text = vector.at(idx).c_str();
  19. return true;
  20. };
  21.  
  22. bool Combo(const char* label, int* currIndex, std::vector<std::string>& values)
  23. {
  24. if (values.empty()) { return false; }
  25. return Combo(label, currIndex, vector_getter,
  26. static_cast<void*>(&values), values.size());
  27. }
  28.  
  29. bool ListBox(const char* label, int* currIndex, std::vector<std::string>& values, int height_in_items = -1)
  30. {
  31. if (values.empty()) { return false; }
  32. return ListBox(label, currIndex, vector_getter,
  33. static_cast<void*>(&values), values.size(), height_in_items);
  34. }
  35.  
  36. static bool ListBox(const char* label, int* current_item, std::function<const char*(int)> lambda, int items_count, int height_in_items)
  37. {
  38. return ImGui::ListBox(label, current_item, [](void* data, int idx, const char** out_text)
  39. {
  40. *out_text = (*reinterpret_cast<std::function<const char*(int)>*>(data))(idx);
  41. return true;
  42. }, &lambda, items_count, height_in_items);
  43. }
  44.  
  45. void ColorPickerBox(const char* picker_idname, float col_n[], bool alpha = false)
  46. {
  47. bool open_popup = ImGui::ColorButton(picker_idname, col_n, ImGuiColorEditFlags_RGB, ImVec2(45.0f, 15.0f));
  48.  
  49. if (open_popup)
  50. ImGui::OpenPopup(picker_idname);
  51.  
  52. if (ImGui::BeginPopup(picker_idname))
  53. {
  54. std::string id_new = picker_idname;
  55. id_new += "##pick";
  56.  
  57. ImGui::MyColorPicker4(id_new.c_str(), col_n, ImGuiColorEditFlags_RGB | (alpha ? ImGuiColorEditFlags_Alpha : 0));
  58. ImGui::EndPopup();
  59. }
  60. }
  61. }
  62.  
  63. auto new_menu::initialize(IDirect3DDevice9* m_device) -> void
  64. {
  65. ImGui_ImplDX9_Init(hooks::window, m_device);
  66.  
  67. auto& style = ImGui::GetStyle();
  68. auto& io = ImGui::GetIO();
  69.  
  70. ImGui::GetIO().MouseDrawCursor = g_cfg.menu.menu_opened;
  71.  
  72. style.Colors[ImGuiCol_Text] = ImVec4(rgba_to_float(188.f, 198.f, 200.f, 255.f));
  73. style.Colors[ImGuiCol_ComboBg] = ImVec4(rgba_to_float(36.0f, 39.0f, 46.0f, 255.0f));
  74. style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.86f, 0.93f, 0.89f, 0.28f);
  75. style.Colors[ImGuiCol_WindowBg] = ImVec4(rgba_to_float(50.0f, 53.0f, 68.0f, 255.0f));
  76. style.Colors[ImGuiCol_ChildWindowBg] = ImVec4(rgba_to_float(50.0f, 53.0f, 68.0f, 255.0f));
  77. style.Colors[ImGuiCol_Border] = ImVec4(rgba_to_float(28.0f, 28.0f, 28.0f, 255.0f));
  78. style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.0f, 0.0f, 0.0f, 0.05f);
  79. style.Colors[ImGuiCol_FrameBg] = ImVec4(rgba_to_float(36.0f, 39.0f, 46.0f, 255.0f));
  80. style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(rgba_to_float(36.0f, 39.0f, 46.0f, 255.0f));
  81. style.Colors[ImGuiCol_FrameBgActive] = ImVec4(rgba_to_float(36.0f, 39.0f, 46.0f, 255.0f));
  82. style.Colors[ImGuiCol_TitleBg] = ImVec4(rgba_to_float(38.0f, 36.0f, 36.0f, 255.f));
  83. style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(rgba_to_float(38.0f, 36.0f, 36.0f, 255.f));
  84. style.Colors[ImGuiCol_TitleBgActive] = ImVec4(rgba_to_float(38.0f, 36.0f, 36.0f, 255.f));
  85. style.Colors[ImGuiCol_MenuBarBg] = ImVec4(rgba_to_float(16.f, 16.f, 23.f, 255.f));
  86. style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(rgba_to_float(22.0f, 22.0f, 22.0f, 255.0f));
  87. style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(rgba_to_float(161.0f, 64.0f, 64.0f, 255.0f));
  88. style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(rgba_to_float(161.0f, 64.0f, 64.0f, 255.0f));
  89. style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(rgba_to_float(161.0f, 64.0f, 64.0f, 255.0f));
  90. style.Colors[ImGuiCol_CheckMark] = ImVec4(rgba_to_float(20.0f, 178.0f, 177.0f, 255.0f));
  91. style.Colors[ImGuiCol_SliderGrab] = ImVec4(rgba_to_float(161.0f, 64.0f, 64.0f, 255.0f));
  92. style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(rgba_to_float(161.0f, 64.0f, 64.0f, 255.0f));
  93. style.Colors[ImGuiCol_Button] = ImVec4(rgba_to_float(41.0f, 44.0f, 51.0f, 255.0f));
  94. style.Colors[ImGuiCol_ButtonHovered] = ImVec4(rgba_to_float(41.0f, 44.0f, 51.0f, 255.0f));
  95. style.Colors[ImGuiCol_ButtonActive] = ImVec4(rgba_to_float(41.0f, 44.0f, 51.0f, 255.0f));
  96. style.Colors[ImGuiCol_Header] = ImVec4(rgba_to_float(25.0f, 36.0f, 54.0f, 255.0f));
  97. style.Colors[ImGuiCol_HeaderHovered] = ImVec4(rgba_to_float(25.0f, 36.0f, 54.0f, 255.0f));
  98. style.Colors[ImGuiCol_HeaderActive] = ImVec4(rgba_to_float(25.0f, 36.0f, 54.0f, 255.0f));
  99. style.Colors[ImGuiCol_Column] = ImVec4(0.14f, 0.16f, 0.19f, 1.00f);
  100. style.Colors[ImGuiCol_ColumnHovered] = ImVec4(0.92f, 0.18f, 0.29f, 0.78f);
  101. style.Colors[ImGuiCol_ColumnActive] = ImVec4(0.92f, 0.18f, 0.29f, 1.00f);
  102. style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.47f, 0.77f, 0.83f, 0.04f);
  103. style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.92f, 0.18f, 0.29f, 0.78f);
  104. style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.92f, 0.18f, 0.29f, 1.00f);
  105. style.Colors[ImGuiCol_PlotLines] = ImVec4(0.86f, 0.93f, 0.89f, 0.63f);
  106. style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.92f, 0.18f, 0.29f, 1.00f);
  107. style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.86f, 0.93f, 0.89f, 0.63f);
  108. style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.92f, 0.18f, 0.29f, 1.00f);
  109. style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.92f, 0.18f, 0.29f, 0.43f);
  110. style.Colors[ImGuiCol_PopupBg] = ImVec4(rgba_to_float(36.0f, 39.0f, 46.0f, 255.0f));
  111. style.Colors[ImGuiCol_ModalWindowDarkening] = ImVec4(0.20f, 0.22f, 0.27f, 0.73f);
  112.  
  113. style.Colors[ImGuiCol_CloseButton] = ImVec4(rgba_to_float(200.0f, 200.0f, 200.0f, 255.0f));
  114. style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(rgba_to_float(200.0f, 200.0f, 200.0f, 255.0f));
  115. style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(rgba_to_float(200.0f, 200.0f, 200.0f, 255.0f));
  116.  
  117. style.WindowMinSize = ImVec2(160.0f, 20.0f);
  118. style.FramePadding = ImVec2(4, 4);
  119. style.ItemSpacing = ImVec2(2.0f, 7.5f);
  120. style.WindowTitleAlign = ImVec2(0.513f, 0.5f);
  121. style.WindowPadding = ImVec2(0.f, 0.f);
  122. style.ItemInnerSpacing = ImVec2(8.0f, 4.0f);
  123.  
  124. style.Alpha = 1.0f;
  125. style.WindowRounding = 0.0f;
  126. style.FrameRounding = 0.0f;
  127. style.IndentSpacing = 6.0f;
  128. style.ColumnsMinSpacing = 50.0f;
  129. style.GrabMinSize = 14.0f;
  130. style.GrabRounding = 0.0f;
  131. style.ScrollbarSize = 12.0f;
  132. style.ScrollbarRounding = 25.0f;
  133. style.CurveTessellationTol = 1.25f;
  134. style.ChildWindowRounding = 0.0f;
  135.  
  136. style.AntiAliasedLines = true;
  137. style.AntiAliasedShapes = true;
  138.  
  139. ImFontConfig font_config;
  140.  
  141. font_config.OversampleH = 1;
  142. font_config.OversampleV = 1;
  143. font_config.PixelSnapH = true;
  144.  
  145. Default = io.Fonts->AddFontFromFileTTF(u8"C:\\Windows\\Fonts\\Tahoma.ttf", 15.0f, &font_config, io.Fonts->GetGlyphRangesCyrillic());
  146. Logo = io.Fonts->AddFontFromFileTTF(u8"C:\\Windows\\Fonts\\Twiddlybitz.ttf", 10.0f, &font_config, io.Fonts->GetGlyphRangesCyrillic());
  147.  
  148. Default_bold = io.Fonts->AddFontFromFileTTF(u8"C:\\Windows\\Fonts\\tahomabd.ttf", 15.0f, &font_config, io.Fonts->GetGlyphRangesCyrillic());
  149. Default_bold2 = io.Fonts->AddFontFromFileTTF(u8"C:\\Windows\\Fonts\\tahomabd.ttf", 14.0f, &font_config, io.Fonts->GetGlyphRangesCyrillic());
  150.  
  151. m_init = true;
  152. }
  153.  
  154. auto new_menu::render(IDirect3DDevice9* m_device) -> void
  155. {
  156. if (!m_init)
  157. initialize(m_device);
  158.  
  159. ImGui_ImplDX9_NewFrame();
  160.  
  161. if (g_cfg.menu.menu_opened)
  162. {
  163. const auto flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_ShowBorders | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings;
  164. const auto flags_child = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings;
  165.  
  166. static auto tab_n = 0;
  167. static auto tab_n2 = 0;
  168.  
  169. static auto check = false;
  170. static auto slider_float = 0.0f;
  171. static auto slider_int = 0;
  172. static float slider_picker[] = { 1.0f, 1.0f, 1.0f, 1.0f };
  173. static const char* combo_box[] = { "test1", "test2", "test3", "test4" };
  174. static const char* selection_type[] = { "field of view", "distance", "health" };
  175. static const char* lag_compensation_type[] = { "refine shot", "prediction" };
  176. ImGui::Begin("##main", &g_cfg.menu.menu_opened, ImVec2(930.0f, 605.0f), 1.0f, flags);
  177. {
  178. auto m_pos = ImGui::GetCursorScreenPos();
  179. auto m_draw = ImGui::GetWindowDrawList();
  180.  
  181. // title bar
  182. m_draw->AddRectFilled(m_pos, m_pos + ImVec2(930.0f, 19.0f), ImGui::GetColorU32(ImVec4(rgba_to_float(50.0f, 53.0f, 68.0f, 255.0f))));
  183.  
  184. // 1st selectable
  185. m_draw->AddRectFilled(m_pos + ImVec2(0.0f, 20.0f), m_pos + ImVec2(125.0f, 605.0f), ImGui::GetColorU32(ImVec4(rgba_to_float(69.0f, 74.0f, 103.0f, 255.0f))));
  186.  
  187. // 2st selectable
  188. m_draw->AddRectFilled(m_pos + ImVec2(125.0f, 20.0f), m_pos + ImVec2(335.0f, 605.0f), ImGui::GetColorU32(ImVec4(rgba_to_float(36.0f, 39.0f, 46.0f, 255.0f))));
  189.  
  190. // border
  191. m_draw->AddRectFilled(m_pos + ImVec2(0.0f, 19.0f), m_pos + ImVec2(930.0f, 19.9f), ImGui::GetColorU32(ImVec4(rgba_to_float(36.0f, 39.0f, 46.0f, 255.0f))));
  192.  
  193. ImGui::PushFont(Logo);
  194. m_draw->AddText(m_pos + ImVec2(7.0f, 2.0f), ImGui::GetColorU32(ImVec4(rgba_to_float(181.0f, 184.0f, 193.0f, 255.0f))), "SAMOWARE-PROJECT");
  195. ImGui::PopFont();
  196.  
  197. // controlers
  198.  
  199. ImGui::SetCursorPos(ImVec2(47.0f, 165.0f));
  200. ImGui::BeginGroup();
  201. ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.0f, 0.0f, 0.0f, 0.0f));
  202. ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.0f, 0.0f, 0.0f, 0.0f));
  203. ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(0.0f, 0.0f, 0.0f, 0.0f));
  204.  
  205. if (ImGui::Button("##Rage", ImVec2(50.0f, 0.0f))) tab_n = 1, tab_n2 = 0;
  206. ImGui::SetCursorPosY(211.0f);
  207. if (ImGui::Button("##Config", ImVec2(50.0f, 0.0f))) tab_n = 2, tab_n2 = 0;
  208. ImGui::SetCursorPos(ImVec2(45.0f, 270.0f));
  209. if (ImGui::Button("##Visuals", ImVec2(50.0f, 0.0f))) tab_n = 3, tab_n2 = 0;
  210. ImGui::SetCursorPos(ImVec2(38.0f, 325.0f));
  211. if (ImGui::Button("##Gameplay", ImVec2(65.0f, 0.0f))) tab_n = 4, tab_n2 = 0;
  212. ImGui::SetCursorPosY(380.0f);
  213. if (ImGui::Button("##Legit", ImVec2(50.0f, 0.0f))) tab_n = 5, tab_n2 = 0;
  214. ImGui::SetCursorPosY(435.0f);
  215. if (ImGui::Button("##Skins", ImVec2(50.0f, 0.0f))) tab_n = 6, tab_n2 = 0;
  216.  
  217. ImGui::PopStyleColor(3);
  218. ImGui::EndGroup();
  219.  
  220. switch (tab_n)
  221. {
  222. case 0:
  223. break;
  224. case 1:
  225. m_draw->AddRectFilled(m_pos + ImVec2(0.0f, 147.0f), m_pos + ImVec2(125.0f, 191.0f), ImGui::GetColorU32(ImVec4(rgba_to_float(20.0f, 178.0f, 177.0f, 220.0f))));
  226.  
  227. ImGui::SetCursorPos(ImVec2(142.0f, 35.0f));
  228. ImGui::PushFont(Default_bold);
  229. ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 1.0f), "Rage");
  230. ImGui::PopFont();
  231.  
  232. ImGui::SetCursorPos(ImVec2(151.0f, 66.0f));
  233. ImGui::PushFont(Default_bold);
  234. ImGui::BeginGroup();
  235.  
  236. tab_n2 == 1 ? ImGui::TextColored(ImVec4(rgba_to_float(20.0f, 176.0f, 173.0f, 255.0f)), "Aimbot") : ImGui::TextColored(ImVec4(rgba_to_float(130.0f, 130.0f, 140.0f, 255.0f)), "Aimbot");
  237. ImGui::SetCursorPosY(99.0f);
  238. tab_n2 == 2 ? ImGui::TextColored(ImVec4(rgba_to_float(20.0f, 176.0f, 173.0f, 255.0f)), "Anti-aim") : ImGui::TextColored(ImVec4(rgba_to_float(130.0f, 130.0f, 140.0f, 255.0f)), "Anti-aim");
  239. ImGui::SetCursorPosY(132.0f);
  240. tab_n2 == 3 ? ImGui::TextColored(ImVec4(rgba_to_float(20.0f, 176.0f, 173.0f, 255.0f)), "AA Standing") : ImGui::TextColored(ImVec4(rgba_to_float(130.0f, 130.0f, 140.0f, 255.0f)), "AA Regular");
  241. ImGui::SetCursorPosY(165.0f);
  242. tab_n2 == 4 ? ImGui::TextColored(ImVec4(rgba_to_float(20.0f, 176.0f, 173.0f, 255.0f)), "AA Moving") : ImGui::TextColored(ImVec4(rgba_to_float(130.0f, 130.0f, 140.0f, 255.0f)), "AA Moving");
  243. ImGui::SetCursorPosY(198.0f);
  244. tab_n2 == 5 ? ImGui::TextColored(ImVec4(rgba_to_float(20.0f, 176.0f, 173.0f, 255.0f)), "AA In air") : ImGui::TextColored(ImVec4(rgba_to_float(130.0f, 130.0f, 140.0f, 255.0f)), "AA Air");
  245.  
  246. ImGui::EndGroup();
  247. ImGui::PopFont();
  248.  
  249. ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.0f, 0.0f, 0.0f, 0.0f));
  250. ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.0f, 0.0f, 0.0f, 0.0f));
  251. ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(0.0f, 0.0f, 0.0f, 0.0f));
  252.  
  253. ImGui::SetCursorPos(ImVec2(151.0f, 65.0f));
  254. if (ImGui::Button("##Aimbot", ImVec2(65.0f, 19.0f))) tab_n2 = 1;
  255.  
  256. ImGui::SetCursorPos(ImVec2(151.0f, 100.0f));
  257. if (ImGui::Button("##Anti-aim", ImVec2(65.0f, 19.0f))) tab_n2 = 2;
  258.  
  259. ImGui::SetCursorPos(ImVec2(151.0f, 132.0f));
  260. if (ImGui::Button("##AA Standing", ImVec2(65.0f, 19.0f))) tab_n2 = 3;
  261.  
  262. ImGui::SetCursorPos(ImVec2(151.0f, 166.0f));
  263. if (ImGui::Button("##AA Moving", ImVec2(65.0f, 19.0f))) tab_n2 = 4;
  264.  
  265. ImGui::SetCursorPos(ImVec2(151.0f, 197.0f));
  266. if (ImGui::Button("##AA In air", ImVec2(65.0f, 19.0f))) tab_n2 = 5;
  267.  
  268. ImGui::PopStyleColor(3);
  269.  
  270. break;
  271. case 2:
  272. m_draw->AddRectFilled(m_pos + ImVec2(0.0f, 199.0f), m_pos + ImVec2(125.0f, 243.0f), ImGui::GetColorU32(ImVec4(rgba_to_float(20.0f, 178.0f, 177.0f, 220.0f))));
  273.  
  274. ImGui::SetCursorPos(ImVec2(142.0f, 35.0f));
  275. ImGui::PushFont(Default_bold);
  276. ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 1.0f), "Config");
  277. ImGui::PopFont();
  278.  
  279. ImGui::SetCursorPos(ImVec2(151.0f, 66.0f));
  280. ImGui::PushFont(Default_bold);
  281. ImGui::BeginGroup();
  282.  
  283. //tab_n2 == 6 ? ImGui::TextColored(ImVec4(rgba_to_float(20.0f, 176.0f, 173.0f, 255.0f)), "Slots") : ImGui::TextColored(ImVec4(rgba_to_float(130.0f, 130.0f, 140.0f, 255.0f)), "Slots");
  284. //ImGui::SetCursorPosY(99.0f);
  285. tab_n2 == 7 ? ImGui::TextColored(ImVec4(rgba_to_float(20.0f, 176.0f, 173.0f, 255.0f)), "Auto") : ImGui::TextColored(ImVec4(rgba_to_float(130.0f, 130.0f, 140.0f, 255.0f)), "Auto");
  286. ImGui::SetCursorPosY(99.0f);
  287. tab_n2 == 8 ? ImGui::TextColored(ImVec4(rgba_to_float(20.0f, 176.0f, 173.0f, 255.0f)), "Scout") : ImGui::TextColored(ImVec4(rgba_to_float(130.0f, 130.0f, 140.0f, 255.0f)), "Scout");
  288. ImGui::SetCursorPosY(132.0f);
  289. tab_n2 == 9 ? ImGui::TextColored(ImVec4(rgba_to_float(20.0f, 176.0f, 173.0f, 255.0f)), "AWP") : ImGui::TextColored(ImVec4(rgba_to_float(130.0f, 130.0f, 140.0f, 255.0f)), "AWP");
  290. ImGui::SetCursorPosY(165.0f);
  291. tab_n2 == 10 ? ImGui::TextColored(ImVec4(rgba_to_float(20.0f, 176.0f, 173.0f, 255.0f)), "Heavy pistols") : ImGui::TextColored(ImVec4(rgba_to_float(130.0f, 130.0f, 140.0f, 255.0f)), "Heavy pistols");
  292. ImGui::SetCursorPosY(198.0f);
  293. tab_n2 == 11 ? ImGui::TextColored(ImVec4(rgba_to_float(20.0f, 176.0f, 173.0f, 255.0f)), "Pistols") : ImGui::TextColored(ImVec4(rgba_to_float(130.0f, 130.0f, 140.0f, 255.0f)), "Pistols");
  294. ImGui::SetCursorPosY(231.0f);
  295. //ImGui::SetCursorPosY(264.0f);
  296. tab_n2 == 12 ? ImGui::TextColored(ImVec4(rgba_to_float(20.0f, 176.0f, 173.0f, 255.0f)), "Other") : ImGui::TextColored(ImVec4(rgba_to_float(130.0f, 130.0f, 140.0f, 255.0f)), "Other");
  297.  
  298. ImGui::EndGroup();
  299. ImGui::PopFont();
  300.  
  301. ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.0f, 0.0f, 0.0f, 0.0f));
  302. ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.0f, 0.0f, 0.0f, 0.0f));
  303. ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(0.0f, 0.0f, 0.0f, 0.0f));
  304.  
  305. //ImGui::SetCursorPos(ImVec2(151.0f, 65.0f));
  306. //if (ImGui::Button("##Slots", ImVec2(65.0f, 19.0f))) tab_n2 = 6;
  307.  
  308. ImGui::SetCursorPos(ImVec2(151.0f, 65.0f));
  309. if (ImGui::Button("##Auto", ImVec2(65.0f, 19.0f))) tab_n2 = 7;
  310.  
  311. ImGui::SetCursorPos(ImVec2(151.0f, 100.0f));
  312. if (ImGui::Button("##Scout", ImVec2(65.0f, 19.0f))) tab_n2 = 8;
  313.  
  314. ImGui::SetCursorPos(ImVec2(151.0f, 166.0f));
  315. if (ImGui::Button("##AWP", ImVec2(65.0f, 19.0f))) tab_n2 = 9;
  316.  
  317. ImGui::SetCursorPos(ImVec2(151.0f, 166.0f));
  318. if (ImGui::Button("##Heavy pistols", ImVec2(65.0f, 19.0f))) tab_n2 = 10;
  319.  
  320. ImGui::SetCursorPos(ImVec2(151.0f, 197.0f));
  321. if (ImGui::Button("##Pistols", ImVec2(65.0f, 19.0f))) tab_n2 = 12;
  322.  
  323. ImGui::SetCursorPos(ImVec2(151.0f, 228.0f));//259
  324. if (ImGui::Button("##Other", ImVec2(65.0f, 19.0f))) tab_n2 = 13;
  325.  
  326. ImGui::PopStyleColor(3);
  327.  
  328. break;
  329. case 3:
  330. m_draw->AddRectFilled(m_pos + ImVec2(0.0f, 257.0f), m_pos + ImVec2(125.0f, 301.0f), ImGui::GetColorU32(ImVec4(rgba_to_float(20.0f, 178.0f, 177.0f, 220.0f))));
  331.  
  332. ImGui::SetCursorPos(ImVec2(142.0f, 35.0f));
  333. ImGui::PushFont(Default_bold);
  334. ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 1.0f), "Visuals");
  335. ImGui::PopFont();
  336.  
  337. break;
  338. case 4:
  339. m_draw->AddRectFilled(m_pos + ImVec2(0.0f, 312.0f), m_pos + ImVec2(125.0f, 356.0f), ImGui::GetColorU32(ImVec4(rgba_to_float(20.0f, 178.0f, 177.0f, 220.0f))));
  340.  
  341. ImGui::SetCursorPos(ImVec2(142.0f, 35.0f));
  342. ImGui::PushFont(Default_bold);
  343. ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 1.0f), "Gameplay");
  344. ImGui::PopFont();
  345.  
  346. break;
  347. case 5:
  348. m_draw->AddRectFilled(m_pos + ImVec2(0.0f, 367.0f), m_pos + ImVec2(125.0f, 411.0f), ImGui::GetColorU32(ImVec4(rgba_to_float(20.0f, 178.0f, 177.0f, 220.0f))));
  349.  
  350. ImGui::SetCursorPos(ImVec2(142.0f, 35.0f));
  351. ImGui::PushFont(Default_bold);
  352. ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 1.0f), "Legit");
  353. ImGui::PopFont();
  354.  
  355. break;
  356. case 6:
  357. m_draw->AddRectFilled(m_pos + ImVec2(0.0f, 422.0f), m_pos + ImVec2(125.0f, 466.0f), ImGui::GetColorU32(ImVec4(rgba_to_float(20.0f, 178.0f, 177.0f, 220.0f))));
  358.  
  359. ImGui::SetCursorPos(ImVec2(142.0f, 35.0f));
  360. ImGui::PushFont(Default_bold);
  361. ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 1.0f), "Skins");
  362. ImGui::PopFont();
  363.  
  364. break;
  365. default:
  366. tab_n = 0;
  367. break;
  368. }
  369. const char* hitboxes[5] = {
  370. "head", "chest", "stomach", "arms", "legs"
  371. };
  372. switch (tab_n2)
  373. {
  374. case 0:
  375. break;
  376. case 1:
  377. m_draw->AddRectFilled(m_pos + ImVec2(142.0f, 64.0f), m_pos + ImVec2(144.0f, 86.0f), ImGui::GetColorU32(ImVec4(rgba_to_float(15.0f, 181.0f, 179.0f, 255.0f))));
  378.  
  379. ImGui::SetCursorPos(ImVec2(350.0f, 35.0f));
  380. ImGui::BeginChild("##Rage", ImVec2(565.0f, 555.0f), false, flags_child);
  381. {
  382. ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(rgba_to_float(108.0f, 112.0f, 123.0f, 255.0f)));
  383. ImGui::PushFont(Default_bold2);
  384.  
  385. ImGui::Checkbox("Enable", &g_cfg.ragebot.enable);
  386. ImGui::SliderInt("Field of view", &g_cfg.ragebot.field_of_view, 0, 360, "%.0f°");
  387. ImGui::Combo("Selection type", &g_cfg.ragebot.selection_type, selection_type, IM_ARRAYSIZE(selection_type));
  388. ImGui::Checkbox("Silent aim", &g_cfg.ragebot.silent_aim);
  389. ImGui::Checkbox("Remove recoil", &g_cfg.ragebot.anti_recoil);
  390. ImGui::Checkbox("Remove spread", &g_cfg.ragebot.anti_spread);
  391. ImGui::Checkbox("Taser bot", &g_cfg.ragebot.zeus_bot);
  392. ImGui::Checkbox("Linear extrapolation", &g_cfg.ragebot.extrapolation);
  393. ImGui::Checkbox("Resolver", &g_cfg.ragebot.antiaim_correction);
  394. ImGui::Hotkey("Resolver override", &g_cfg.ragebot.override_key);
  395. ImGui::Checkbox("Aim step", &g_cfg.ragebot.aimstep);
  396. ImGui::Checkbox("Lag compensation", &g_cfg.ragebot.lagcomp);
  397. ImGui::SliderFloat("Backtrack limit", &g_cfg.ragebot.lagcomp_time, 0.0f, 0.2f, "%.1f s");
  398. ImGui::Combo("Compensation type", &g_cfg.ragebot.lag_compensation_type, lag_compensation_type, IM_ARRAYSIZE(lag_compensation_type));
  399.  
  400. /*ImGui::Hotkey("Hotkey", &slider_int);
  401. ImGui::ColorPickerBox("##picker", slider_picker);
  402. ImGui::Button("Button", ImVec2(0.0f, 0.0f), false, true);
  403.  
  404. ImGui::SetCursorPosX(-2.0f);
  405. ImGui::Combo("Combo", &slider_int, combo_box, IM_ARRAYSIZE(combo_box));*/
  406.  
  407. ImGui::PopFont();
  408. ImGui::PopStyleColor();
  409. }
  410.  
  411. ImGui::End();
  412.  
  413. break;
  414. case 2:
  415. m_draw->AddRectFilled(m_pos + ImVec2(142.0f, 96.0f), m_pos + ImVec2(144.0f, 118.0f), ImGui::GetColorU32(ImVec4(rgba_to_float(15.0f, 181.0f, 179.0f, 255.0f))));
  416. break;
  417. case 3:
  418. m_draw->AddRectFilled(m_pos + ImVec2(142.0f, 130.0f), m_pos + ImVec2(144.0f, 151.0f), ImGui::GetColorU32(ImVec4(rgba_to_float(15.0f, 181.0f, 179.0f, 255.0f))));
  419. break;
  420. case 4:
  421. m_draw->AddRectFilled(m_pos + ImVec2(142.0f, 161.0f), m_pos + ImVec2(144.0f, 184.0f), ImGui::GetColorU32(ImVec4(rgba_to_float(15.0f, 181.0f, 179.0f, 255.0f))));
  422. break;
  423. case 5:
  424. m_draw->AddRectFilled(m_pos + ImVec2(142.0f, 194.0f), m_pos + ImVec2(144.0f, 217.0f), ImGui::GetColorU32(ImVec4(rgba_to_float(15.0f, 181.0f, 179.0f, 255.0f))));
  425. break;
  426. case 6:
  427. m_draw->AddRectFilled(m_pos + ImVec2(142.0f, 227.0f), m_pos + ImVec2(144.0f, 250.0f), ImGui::GetColorU32(ImVec4(rgba_to_float(15.0f, 181.0f, 179.0f, 255.0f))));
  428. break;
  429. case 7:
  430. m_draw->AddRectFilled(m_pos + ImVec2(142.0f, 64.0f), m_pos + ImVec2(144.0f, 86.0f), ImGui::GetColorU32(ImVec4(rgba_to_float(15.0f, 181.0f, 179.0f, 255.0f))));
  431.  
  432. ImGui::SetCursorPos(ImVec2(350.0f, 35.0f));
  433. ImGui::BeginChild("##Auto", ImVec2(565.0f, 555.0f), false, flags_child);
  434. {
  435. ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(rgba_to_float(108.0f, 112.0f, 123.0f, 255.0f)));
  436. ImGui::PushFont(Default_bold2);
  437.  
  438. ImGui::Checkbox("Autoshoot", &g_cfg.ragebot.autoshoot[5]);
  439. ImGui::Checkbox("Autowall", &g_cfg.ragebot.autowall[5]);
  440. ImGui::SliderInt("Minimum damage", &g_cfg.ragebot.minimum_damage[5], 1, 100, "%.0f ");
  441. ImGui::Checkbox("Autoscope", &g_cfg.ragebot.autoscope[2]);
  442. ImGui::Checkbox("Hitchance", &g_cfg.ragebot.hitchance[5]);
  443. ImGui::SliderInt("Hitchance value", &g_cfg.ragebot.hitchance_amount[5], 0, 99, "%.0f %");
  444.  
  445. for (auto i = 0; i < IM_ARRAYSIZE(hitboxes); ++i)
  446. {
  447. ImGui::Selectable(hitboxes[i], &g_cfg.ragebot.hitscan[5]);
  448. }
  449. //ImGui::ListBox("Hitboxes", &g_cfg.ragebot.hitscan[5], hitboxes, IM_ARRAYSIZE(hitboxes));
  450. ImGui::SliderFloat("Pointscale", &g_cfg.ragebot.pointscale[5], 0, 1, "%.2f");
  451. ImGui::Checkbox("Quickstop", &g_cfg.ragebot.quickstop[5]);
  452.  
  453. ImGui::PopFont();
  454. ImGui::PopStyleColor();
  455. }
  456.  
  457. ImGui::End();
  458.  
  459. break;
  460. default:
  461. tab_n2 = 0;
  462. break;
  463. }
  464.  
  465. ImGui::SetCursorPos(ImVec2(47.0f, 160.0f));
  466. ImGui::BeginGroup();
  467.  
  468. if (tab_n == 1)
  469. {
  470. ImGui::PushFont(Default_bold);
  471. ImGui::Text("Rage");
  472. ImGui::PopFont();
  473. }
  474. else
  475. ImGui::Text("Rage");
  476.  
  477. ImGui::SetCursorPos(ImVec2(45.0f, 212.0f));
  478. if (tab_n == 2)
  479. {
  480. ImGui::PushFont(Default_bold);
  481. ImGui::Text("Config");
  482. ImGui::PopFont();
  483. }
  484. else
  485. ImGui::Text("Config");
  486.  
  487. ImGui::SetCursorPos(ImVec2(43.0f, 270.0f));
  488. if (tab_n == 3)
  489. {
  490. ImGui::PushFont(Default_bold);
  491. ImGui::Text("Visuals");
  492. ImGui::PopFont();
  493. }
  494. else
  495. ImGui::Text("Visuals");
  496.  
  497. ImGui::SetCursorPos(ImVec2(35.0f, 325.0f));
  498. if (tab_n == 4)
  499. {
  500. ImGui::PushFont(Default_bold);
  501. ImGui::Text("Gameplay");
  502. ImGui::PopFont();
  503. }
  504. else
  505. ImGui::Text("Gameplay");
  506.  
  507. ImGui::SetCursorPosY(380.0f);
  508. if (tab_n == 5)
  509. {
  510. ImGui::PushFont(Default_bold);
  511. ImGui::Text("Legit");
  512. ImGui::PopFont();
  513. }
  514. else
  515. ImGui::Text("Legit");
  516.  
  517. ImGui::SetCursorPosY(435.0f);
  518. if (tab_n == 6)
  519. {
  520. ImGui::PushFont(Default_bold);
  521. ImGui::Text("Skins");
  522. ImGui::PopFont();
  523. }
  524. else
  525. ImGui::Text("Skins");
  526.  
  527. ImGui::EndGroup();
  528. }
  529.  
  530. ImGui::End();
  531. }
  532.  
  533. ImGui::Render();
  534. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement