SHARE
TWEET

Untitled

a guest Jun 19th, 2019 99 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "Menu.hpp"
  2. #define NOMINMAX
  3. #include <Windows.h>
  4. #include <chrono>
  5.  
  6. #include "csgostructs.hpp"
  7. #include "input.hpp"
  8. #include "options.hpp"
  9. #include "droid.hpp"
  10. #include "Skins.h"
  11.  
  12. #define IMGUI_DEFINE_MATH_OPERATORS
  13. #include "imgui/imgui_internal.h"
  14. #include "imgui/directx9/imgui_impl_dx9.h"
  15.  
  16.  
  17.  
  18. void Menu::Initialize()
  19. {
  20.     _visible = false;
  21.     CreateStyle();
  22. }
  23.  
  24. void Menu::OnDeviceLost()
  25. {
  26.     ImGui_ImplDX9_InvalidateDeviceObjects();
  27. }
  28.  
  29. void Menu::OnDeviceReset()
  30. {
  31.     ImGui_ImplDX9_CreateDeviceObjects();
  32. }
  33.  
  34. void Menu::Render()
  35. {
  36.     ImGui::GetIO().MouseDrawCursor = _visible;
  37.  
  38.     if(!_visible)
  39.         return;
  40.  
  41.     ImGui::SetNextWindowPosCenter(ImGuiCond_Once);
  42.     ImGui::SetNextWindowSize(ImVec2{ 180, 160 }, ImGuiSetCond_Once); //szer wys
  43.  
  44.     if (ImGui::Begin(" Boruqhook", &_visible, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize))
  45.     {
  46.         ImGui::Checkbox("Boxes", &g_Options.esp_player_boxes);
  47.         ImGui::SameLine();
  48.         ImGui::Checkbox("Names", &g_Options.esp_player_names);
  49.         ImGui::Checkbox("Weapons", &g_Options.esp_player_weapons);
  50.         ImGui::SameLine();
  51.         ImGui::Checkbox("Chams", &g_Options.chams_player_enabled);
  52.         ImGui::Checkbox("Backtrack", &g_Options.misc_backtrack);
  53.         ImGui::SameLine();
  54.         ImGui::Checkbox("Bhop", &g_Options.misc_bhop);
  55.         ImGui::Checkbox("Team check", &g_Options.misc_checkteam);
  56.         ImGui::SameLine();
  57.         if (ImGui::Button(("update")))
  58.         {
  59.              Skinchanger::Get().ForceFull();
  60.         }
  61.     }
  62.     ImGui::End();
  63.  
  64. }
  65.  
  66. void Menu::Show()
  67. {
  68.     _visible = true;
  69. }
  70.  
  71. void Menu::Hide()
  72. {
  73.     _visible = false;
  74. }
  75.  
  76. void Menu::Toggle()
  77. {
  78.     _visible = !_visible;
  79. }
  80.  
  81. void Menu::CreateStyle()
  82. {
  83.     ImGuiStyle& style = ImGui::GetStyle();
  84.  
  85.     style.WindowPadding = ImVec2(10, 10);
  86.     style.WindowRounding = 0.0f;
  87.     style.FramePadding = ImVec2(5, 5);
  88.     style.FrameRounding = 0.0f;
  89.     style.ItemSpacing = ImVec2(5, 5);
  90.     style.ItemInnerSpacing = ImVec2(8, 6);
  91.     style.IndentSpacing = 25.0f;
  92.     style.ScrollbarSize = 15.0f;
  93.     style.ScrollbarRounding = 9.0f;
  94.     style.GrabMinSize = 5.0f;
  95.     style.GrabRounding = 3.0f;
  96.  
  97.     style.Colors[ImGuiCol_Text] = ImVec4(0.80f, 0.80f, 0.83f, 1.00f);
  98.     style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
  99.     style.Colors[ImGuiCol_WindowBg] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
  100.     style.Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
  101.     style.Colors[ImGuiCol_PopupBg] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f);
  102.     style.Colors[ImGuiCol_Border] = ImVec4(0.80f, 0.80f, 0.83f, 0.88f);
  103.     style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.92f, 0.91f, 0.88f, 0.00f);
  104.     style.Colors[ImGuiCol_FrameBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
  105.     style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
  106.     style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
  107.     style.Colors[ImGuiCol_TitleBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
  108.     style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(1.00f, 0.98f, 0.95f, 0.75f);
  109.     style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f);
  110.     style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
  111.     style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
  112.     style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
  113.     style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
  114.     style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
  115.     style.Colors[ImGuiCol_CheckMark] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
  116.     style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
  117.     style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
  118.     style.Colors[ImGuiCol_Button] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
  119.     style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
  120.     style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
  121.     style.Colors[ImGuiCol_Header] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
  122.     style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
  123.     style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
  124.     style.Colors[ImGuiCol_Column] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
  125.     style.Colors[ImGuiCol_ColumnHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
  126.     style.Colors[ImGuiCol_ColumnActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
  127.     style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
  128.     style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
  129.     style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
  130.     style.Colors[ImGuiCol_PlotLines] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f);
  131.     style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
  132.     style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f);
  133.     style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
  134.     style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.25f, 1.00f, 0.00f, 0.43f);
  135.     style.Colors[ImGuiCol_ModalWindowDarkening] = ImVec4(1.00f, 0.98f, 0.95f, 0.73f);
  136. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top