ImVec4 GUI::rgb_to_imvec4(float r, float g, float b, float a){return ImVec4(r / 255, g / 255, b / 255, a / 255);}
void set_element_pos(float x, float y){ImGui::SetCursorPos(ImVec2(x, y));}
void set_element_pos_x(float x){ImGui::SetCursorPosX(x);}
void set_element_pos_y(float y){ImGui::SetCursorPosY(y);}
void GUI::tab(const char* label, int number)
{
if (selected_tab == number)
style->Colors[ImGuiCol_Button] = main_color;
if (ImGui::Button(label, ImVec2(70, 20)))
selected_tab = number;
if (selected_tab == number)
{
if (!config->style.lightTheme)
style->Colors[ImGuiCol_Button] = rgb_to_imvec4(51, 51, 51, 255);
else
style->Colors[ImGuiCol_Button] = white;
}
}
void GUI::dark_theme()
{
style->Colors[ImGuiCol_WindowBg] = rgb_to_imvec4(23, 23, 23, 255);
style->Colors[ImGuiCol_Text] = rgb_to_imvec4(215, 215, 215, 255);
style->Colors[ImGuiCol_Button] = rgb_to_imvec4(51, 51, 51, 255);
style->Colors[ImGuiCol_Border] = rgb_to_imvec4(35, 35, 35, 255);
style->Colors[ImGuiCol_FrameBg] = style->Colors[ImGuiCol_Button];
}
void GUI::light_theme()
{
style->Colors[ImGuiCol_WindowBg] = rgb_to_imvec4(240, 240, 240, 255);
style->Colors[ImGuiCol_Text] = rgb_to_imvec4(145, 145, 145, 255);
style->Colors[ImGuiCol_Button] = white;
style->Colors[ImGuiCol_Border] = rgb_to_imvec4(145, 145, 145, 255);
style->Colors[ImGuiCol_FrameBg] = white;
}
void GUI::renderGuiStyle2() noexcept
{
style->WindowRounding = 0;
style->WindowBorderSize = 1;
style->FrameRounding = 2;
style->FrameBorderSize = 1;
style->GrabRounding = 3;
if (config->style.lightTheme)
{
light_theme();
}
else
{
dark_theme();
}
style->Colors[ImGuiCol_Separator] = style->Colors[ImGuiCol_Border];
style->Colors[ImGuiCol_ButtonHovered] = main_color;
style->Colors[ImGuiCol_ButtonActive] = main_color_hover;
style->Colors[ImGuiCol_CheckMark] = main_color;
style->Colors[ImGuiCol_FrameBgHovered] = style->Colors[ImGuiCol_WindowBg];
style->Colors[ImGuiCol_FrameBgActive] = style->Colors[ImGuiCol_WindowBg];
style->Colors[ImGuiCol_SliderGrab] = main_color;
style->Colors[ImGuiCol_SliderGrabActive] = main_color_hover;
style->Colors[ImGuiCol_Header] = main_color;
style->Colors[ImGuiCol_HeaderActive] = main_color_hover;
style->Colors[ImGuiCol_HeaderHovered] = main_color_hover;
style->Colors[ImGuiCol_ScrollbarBg] = transparent;
style->Colors[ImGuiCol_ScrollbarGrab] = main_color;
style->Colors[ImGuiCol_ScrollbarGrabActive] = main_color_hover;
style->Colors[ImGuiCol_ScrollbarGrabHovered] = main_color_hover;
ImGui::SetNextWindowSize(ImVec2(640, 445));
ImGui::Begin(name, nullptr, ImGuiWindowFlags_NoDecoration);
{
set_element_pos(5, 5);
ImGui::Text(name);
ImGui::Separator();
set_element_pos_x(14);
ImGui::BeginChild("##tabs", ImVec2(640, 22));
{
tab("esp", 0);
ImGui::SameLine();
tab("visuals", 1);
ImGui::SameLine();
tab("chams", 2);
ImGui::SameLine();
tab("skins", 3);
ImGui::SameLine();
tab("aimbot", 4);
ImGui::SameLine();
tab("misc", 5);
ImGui::SameLine();
tab("profile", 6);
ImGui::SameLine();
tab("settings", 7);
}
ImGui::EndChild();
ImGui::Separator();
ImGui::BeginChild("##main");
{
if (selected_tab == 0) renderStreamProofESPWindow(true);
if (selected_tab == 1) renderVisualsWindow(true);
if (selected_tab == 2) renderChamsWindow(true);
if (selected_tab == 3) renderSkinChangerWindow(true);
else if (selected_tab == 4) renderAimbotWindow(true);
else if (selected_tab == 5) renderMiscWindow(true);
else if (selected_tab == 6) renderProfileChangerWindow(true);
else if (selected_tab == 7) renderConfigWindow(true);
}
ImGui::EndChild();
}
ImGui::End();
}