Advertisement
Guest User

d

a guest
Jan 22nd, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.71 KB | None | 0 0
  1. #include <sstream>
  2. #include <Windows.h>
  3. #include "XorStr.h"
  4. #include "imgui/imgui.h"
  5. #include "GUI.h"
  6. #include "Config.h"
  7. #include "Hacks/Misc.h"
  8.  
  9. void GUI::render() noexcept
  10. {
  11. main();
  12. }
  13.  
  14. void GUI::checkBoxAndColorPicker(const std::string_view name, bool* enable, float* color) const noexcept
  15. {
  16. ImGui::Checkbox(std::string{ "##" }.append(name).c_str(), enable);
  17. ImGui::SameLine(0.0f, 5.0f);
  18. bool openPopup = ImGui::ColorButton(std::string{ "##" }.append(name).append("ColorButton").c_str(), ImColor{ color[0], color[1], color[2] }, ImGuiColorEditFlags_NoTooltip);
  19. ImGui::SameLine(0.0f, 5.0f);
  20. ImGui::Text(name.data());
  21. if (openPopup)
  22. ImGui::OpenPopup(std::string{ "##" }.append(name).append("Popup").c_str());
  23. if (ImGui::BeginPopup(std::string{ "##" }.append(name).append("Popup").c_str())) {
  24. ImGui::ColorPicker3(std::string{ "##" }.append(name).append("Picker").c_str(), color, ImGuiColorEditFlags_RGB | ImGuiColorEditFlags_NoSidePreview);
  25. ImGui::EndPopup();
  26. }
  27. }
  28.  
  29. void GUI::hotkey(int* key) const noexcept
  30. {
  31. ImGui::Text((std::ostringstream{ } << "[ " << (*key ? std::to_string(*key) : "key") << " ]").str().c_str());
  32. if (ImGui::IsItemHovered()) {
  33. ImGuiIO& io = ImGui::GetIO();
  34. for (int i = 0; i < IM_ARRAYSIZE(io.KeysDown); i++)
  35. if (ImGui::IsKeyPressed(i) && i != VK_INSERT)
  36. *key = i != VK_ESCAPE ? i : 0;
  37. }
  38. }
  39.  
  40. void GUI::main() noexcept
  41. {
  42. if (window.misc) {
  43. ImGui::SetNextWindowSize({ 800.0f, 500.0f });
  44. ImGui::Begin("Aries Cheat - Version: v1.5 - Author: David", &window.misc, ImGuiWindowFlags_NoCollapse);
  45. ImGui::PushItemWidth(160.0f);
  46.  
  47. ImGui::Columns(2, XorStr("Test"), false);
  48. {
  49. if (window.misc) {
  50. // Aimbot column
  51. ImGui::Text(XorStr("Aimbot - Others"));
  52. ImGui::Checkbox(XorStr("Enabled"), &config.aimbot.enabled);
  53. ImGui::Checkbox(XorStr("Silent"), &config.aimbot.silent);
  54. ImGui::SliderFloat(XorStr("##Fov"), &config.aimbot.fov, 0.0f, 180.0f, "Fov: %.2f");
  55. ImGui::SliderFloat(XorStr("##Smooth"), &config.aimbot.smooth, 1.0f, 100.0f, "Smooth: %.2f");
  56. }
  57. if (window.misc) {
  58. // Visuals column
  59. ImGui::Text(XorStr("Visuals - Others"));
  60. ImGui::Checkbox(XorStr("No hands"), &config.visuals.noHands);
  61. ImGui::Checkbox(XorStr("No sleeves"), &config.visuals.noSleeves);
  62. ImGui::Checkbox(XorStr("Thirdperson"), &config.visuals.thirdperson);
  63. hotkey(&config.visuals.thirdpersonKey);
  64. ImGui::SliderInt(XorStr("##Thirdperson distance"), &config.visuals.thirdpersonDistance, 0, 1000, "Thirdperson distance: %d");
  65. }
  66.  
  67. if (window.misc) {
  68. // Trigger Bot column
  69. ImGui::Text(XorStr("TriggerBot - Others"));
  70. ImGui::Checkbox(XorStr("Enabled"), &config.triggerbot.enabled);
  71. ImGui::Checkbox(XorStr("On key"), &config.triggerbot.onKey);
  72. hotkey(&config.triggerbot.key);
  73. ImGui::SliderInt(XorStr("##Shot delay"), &config.triggerbot.shotDelay, 0, 250, "Shot delay: %d ms");
  74. }
  75. // NEXT!!!!!
  76.  
  77. ImGui::NextColumn();
  78.  
  79. if (window.misc) {
  80. // Extras column
  81. ImGui::Text(XorStr("Extras - Others"));
  82. ImGui::Checkbox("Bunny hop", &config.misc.bunnyHop);
  83. static std::vector<char> buffer(16);
  84. ImGui::InputText("##Clantag", buffer.data(), buffer.size());
  85. ImGui::SameLine();
  86. if (ImGui::Button("Set clantag"))
  87. Misc::clanTag(buffer.data());
  88.  
  89. ImGui::Checkbox(XorStr("Disable post-processing"), &config.misc.disablePostProcessing);
  90. ImGui::SliderInt(XorStr("##Flash reduction"), &config.misc.flashReduction, 0, 100, "Flash reduction: %d%%");
  91. ImGui::Checkbox(XorStr("Inverse ragdoll gravity"), &config.misc.inverseRagdollGravity);
  92. ImGui::Checkbox(XorStr("Fast duck"), &config.misc.fastDuck);
  93. ImGui::Checkbox(XorStr("No smoke"), &config.misc.noSmoke);
  94. if (!config.misc.noSmoke)
  95. ImGui::Checkbox(XorStr("Wireframe smoke"), &config.misc.wireframeSmoke);
  96. ImGui::Combo(XorStr("Skybox"), &config.misc.skybox, "Default\0cs_baggage_skybox_\0cs_tibet\0embassy\0italy\0jungle\0nukeblank\0office\0sky_cs15_daylight01_hdr\0sky_cs15_daylight02_hdr\0sky_cs15_daylight03_hdr\0sky_cs15_daylight04_hdr\0sky_csgo_cloudy01\0sky_csgo_night_flat\0sky_csgo_night02\0sky_day02_05_hdr\0sky_day02_05\0sky_dust\0sky_l4d_rural02_ldr\0sky_venice\0vertigo_hdr\0vertigo\0vertigoblue_hdr\0vietnam");
  97. ImGui::SliderInt(XorStr("##Viewmodel FOV"), &config.misc.viewmodelFov, -60, 60, "Viewmodel FOV: %d");
  98. ImGui::ColorEdit3(XorStr("World color"), config.misc.worldColor, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoTooltip);
  99. ImGui::Checkbox(XorStr("Auto pistol"), &config.misc.autoPistol);
  100. }
  101. if (window.misc) {
  102. // Wallhack column
  103. ImGui::Text(XorStr("Wallhack - Others"));
  104. ImGui::Columns(2, nullptr, false);
  105. ImGui::SetColumnOffset(1, 170.0f);
  106.  
  107. ImGui::Checkbox(XorStr("Enabled"), &config.glow.enabled);
  108. ImGui::SliderFloat(XorStr("##Thickness"), &config.glow.thickness, 0.0f, 1.0f, "Thickness: %.2f");
  109. ImGui::SliderFloat(XorStr("##Alpha"), &config.glow.alpha, 0.0f, 1.0f, "Alpha: %.2f");
  110. ImGui::SliderInt(XorStr("##Style"), &config.glow.style, 0, 3, "Style: %d");
  111. checkBoxAndColorPicker(XorStr("Allies"), &config.glow.allies, config.glow.alliesColor);
  112.  
  113. checkBoxAndColorPicker(XorStr("Weapons"), &config.glow.weapons, config.glow.weaponsColor);
  114. checkBoxAndColorPicker(XorStr("C4"), &config.glow.C4, config.glow.C4Color);
  115. checkBoxAndColorPicker(XorStr("Planted C4"), &config.glow.plantedC4, config.glow.plantedC4Color);
  116. checkBoxAndColorPicker(XorStr("Chickens"), &config.glow.chickens, config.glow.chickensColor);
  117. checkBoxAndColorPicker(XorStr("Enemies"), &config.glow.enemies, config.glow.enemiesColor);
  118. }
  119. ImGui::End();
  120. }
  121. }
  122. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement