Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ui.hh"
- #include "../globals.hh"
- #include "../imgui/imgui.h"
- #include "../imgui/imgui_internal.h"
- #include <chrono>
- #include <thread>
- using namespace std;
- DWORD processid;
- static int selectorlb1 = 0;
- class Waypoint {
- public:
- int x, y, z;
- std::string action;
- };
- bool waypoint_getter(void* data, int index, const char** output)
- {
- Waypoint* waypoints = (Waypoint*)data;
- Waypoint& current_waypoint = waypoints[index];
- *output = current_waypoint.action.c_str(); // not very safe
- return true;
- }
- void detected_process()
- {
- HWND hwnd = FindWindowA(NULL, ("WolfTeam"));
- GetWindowThreadProcessId(hwnd, &processid);
- if (hwnd)
- {
- ImGui::Text("corriendo");
- }
- else
- {
- ImGui::Text("no esta corriendo");
- }
- }
- static int removxe = 0;
- static int aea = 0;
- void ui::render() {
- if (!globals.active) return;
- ImGui::SetNextWindowPos(ImVec2(window_pos.x, window_pos.y), ImGuiCond_Once);
- ImGui::SetNextWindowSize(ImVec2(window_size.x, window_size.y));
- ImGui::SetNextWindowBgAlpha(1.0f);
- ImGui::Begin(window_title, &globals.active, window_flags);
- {
- ImGui::Button("pasa", ImVec2(50, 50));
- 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" };
- if (ImGui::ListBoxHeader("toda la wea", ImVec2(200, 60))) {
- for (int i = 0; i < IM_ARRAYSIZE(listbox_items); i++) {
- if (ImGui::Selectable(listbox_items[i]), i)
- {
- removxe = i;
- }
- }
- ImGui::ListBoxFooter();
- }
- if (ImGui::BeginTabBar("mytb", ImGuiTabBarFlags_Reorderable))
- {
- if (ImGui::BeginTabItem("csh"))
- {
- ImGui::Text("a");
- ImGui::EndTabItem();
- }
- if (ImGui::BeginTabItem("bin"))
- {
- ImGui::Text("b");
- ImGui::EndTabItem();
- }
- ImGui::EndTabBar();
- }
- }
- ImGui::End();
- }
- void ui::init(LPDIRECT3DDEVICE9 device) {
- dev = device;
- // colors
- //ImGui::StyleColorsDark();
- if (window_pos.x == 0) {
- RECT screen_rect{};
- GetWindowRect(GetDesktopWindow(), &screen_rect);
- screen_res = ImVec2(float(screen_rect.right), float(screen_rect.bottom));
- window_pos = (screen_res - window_size) * 0.5f;
- // init images here
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement