Advertisement
iJorgePc

aea

Apr 14th, 2023
825
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.57 KB | Source Code | 0 0
  1. #include "ui.hh"
  2. #include "../globals.hh"
  3. #include "../imgui/imgui.h"
  4. #include "../imgui/imgui_internal.h"
  5.  
  6.  
  7. #include <chrono>
  8. #include <thread>
  9.  
  10.  
  11. using namespace std;
  12.  
  13.  
  14.  
  15. DWORD processid;
  16. static int selectorlb1 = 0;
  17.  
  18. class Waypoint {
  19. public:
  20.     int x, y, z;
  21.     std::string action;
  22. };
  23.  
  24. bool waypoint_getter(void* data, int index, const char** output)
  25. {
  26.     Waypoint* waypoints = (Waypoint*)data;
  27.     Waypoint& current_waypoint = waypoints[index];
  28.  
  29.     *output = current_waypoint.action.c_str(); // not very safe
  30.  
  31.     return true;
  32. }
  33.  
  34. void detected_process()
  35. {
  36.     HWND hwnd = FindWindowA(NULL, ("WolfTeam"));
  37.     GetWindowThreadProcessId(hwnd, &processid);
  38.     if (hwnd)
  39.     {
  40.         ImGui::Text("corriendo");
  41.     }
  42.     else
  43.     {
  44.         ImGui::Text("no esta corriendo");
  45.     }
  46. }
  47.  
  48. static int removxe = 0;
  49. static int aea = 0;
  50. void ui::render() {
  51.     if (!globals.active) return;
  52.  
  53.     ImGui::SetNextWindowPos(ImVec2(window_pos.x, window_pos.y), ImGuiCond_Once);
  54.     ImGui::SetNextWindowSize(ImVec2(window_size.x, window_size.y));
  55.     ImGui::SetNextWindowBgAlpha(1.0f);
  56.  
  57.     ImGui::Begin(window_title, &globals.active, window_flags);
  58.     {
  59.         ImGui::Button("pasa", ImVec2(50, 50));
  60.         const char* listbox_items[] = { "A fruit with a very long name so it makes sense to have a scrollbar", "Banana", "Cherry", "Kiwi", "Mango", "Orange", "Pineapple", "Strawberry", "Watermelon" };
  61.         if (ImGui::ListBoxHeader("toda la wea", ImVec2(200, 60))) {
  62.             for (int i = 0; i < IM_ARRAYSIZE(listbox_items); i++) {
  63.                 if (ImGui::Selectable(listbox_items[i]), i)
  64.                 {
  65.                     removxe = i;
  66.                 }
  67.             }
  68.             ImGui::ListBoxFooter();
  69.         }
  70.         if (ImGui::BeginTabBar("mytb", ImGuiTabBarFlags_Reorderable))
  71.         {
  72.             if (ImGui::BeginTabItem("csh"))
  73.             {
  74.                 ImGui::Text("a");
  75.                
  76.                 ImGui::EndTabItem();
  77.             }
  78.             if (ImGui::BeginTabItem("bin"))
  79.             {
  80.                 ImGui::Text("b");
  81.  
  82.                 ImGui::EndTabItem();
  83.             }
  84.  
  85.             ImGui::EndTabBar();
  86.         }
  87.     }
  88.     ImGui::End();
  89. }
  90.  
  91. void ui::init(LPDIRECT3DDEVICE9 device) {
  92.     dev = device;
  93.    
  94.     // colors
  95.     //ImGui::StyleColorsDark();
  96.  
  97.     if (window_pos.x == 0) {
  98.         RECT screen_rect{};
  99.         GetWindowRect(GetDesktopWindow(), &screen_rect);
  100.         screen_res = ImVec2(float(screen_rect.right), float(screen_rect.bottom));
  101.         window_pos = (screen_res - window_size) * 0.5f;
  102.  
  103.         // init images here
  104.     }
  105. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement