Подведи собственные итоги года совместно с YOUGAME и забери ценные призы! Перейти

Вопрос Делаю меню и тут такая штука

Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
void c_menu::draw(bool is_open)
{
static auto w = 0, h = 0, current_h = 0;
m_engine()->GetScreenSize(w, current_h);

if (h != current_h)
{
if (h)
update_scripts = true;

h = current_h;
update_dpi = true;
}

// Style
auto& s = ImGui::GetStyle();
s.FrameRounding = 6;
s.ChildRounding = 10;
s.PopupRounding = 5;
s.ScrollbarRounding = 0;
s.ScrollbarSize = 5;
s.FramePadding = ImVec2(2, 1);
// Colors
auto c = s.Colors;
c[ImGuiCol_WindowBg] = ImColor(4, 16, 30);
c[ImGuiCol_FrameBg] = ImColor(7, 35, 66);
c[ImGuiCol_FrameBgHovered] = ImColor(8, 35, 65);
c[ImGuiCol_FrameBgActive] = ImColor(77, 125, 253);
c[ImGuiCol_Separator] = ImColor(77, 125, 253);
c[ImGuiCol_SliderGrab] = ImColor(77, 125, 253, 200);
c[ImGuiCol_SliderGrabActive] = ImColor(77, 125, 253);
c[ImGuiCol_PopupBg] = ImColor(7, 35, 66);
c[ImGuiCol_ScrollbarBg] = ImColor(4, 21, 39);
c[ImGuiCol_ScrollbarGrab] = ImColor(77, 125, 253);
c[ImGuiCol_ScrollbarGrabActive] = ImColor(77, 125, 253);
c[ImGuiCol_ScrollbarGrabHovered] = ImColor(77, 125, 253, 200);
c[ImGuiCol_Border] = ImColor();
c[ImGuiCol_ChildBg] = ImColor(4, 21, 39);
c[ImGuiCol_Header] = ImColor(4, 21, 39);
c[ImGuiCol_HeaderHovered] = ImColor(77, 125, 253, 200);
c[ImGuiCol_HeaderActive] = ImColor(77, 125, 253);
c[ImGuiCol_Button] = ImColor(7, 35, 66);
c[ImGuiCol_ButtonHovered] = ImColor(77, 125, 253, 200);
c[ImGuiCol_ButtonActive] = ImColor(77, 125, 253);
c[ImGuiCol_Text] = ImColor(255, 255, 255);
c[ImGuiCol_TextDisabled] = ImColor(100, 118, 140);

static float m_alpha = 0.0002f;





m_alpha = math::clamp(m_alpha + (3.f * ImGui::GetIO().DeltaTime * (is_open ? 1.f : -1.f)), 0.0001f, 1.f);

public_alpha = m_alpha;

if (m_alpha <= 0.0001f)
return;

ImGui::PushStyleVar(ImGuiStyleVar_Alpha, m_alpha);

if (!menu_setupped)
menu_setup(ImGui::GetStyle());

ImGui::PushStyleColor(ImGuiCol_ScrollbarGrab, ImVec4(ImGui::GetStyle().Colors[ImGuiCol_ScrollbarGrab].x, ImGui::GetStyle().Colors[ImGuiCol_ScrollbarGrab].y, ImGui::GetStyle().Colors[ImGuiCol_ScrollbarGrab].z, m_alpha));




{
ImGui::PushFont(g_pMenuFont);
ImGui::BeginGroup();
{
if (animation_menu)
{
plus += 10;
if (plus >= 480)
{
plus = 480;
animation_menu = false;
}
}
ImGui::SetNextWindowPos(ImVec2(x + 170, y + 60));
ImGui::SetNextWindowSize(ImVec2(520, plus));
ImGui::Begin("##tabs", nullptr, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize);
{
if (g_Search.find && search[0] != '\0' && strlen(search) >= 3)
{
ImGui::BeginChild("Search", ImVec2(500, 460), true, ImGuiWindowFlags_NoScrollbar);
{
g_Search.drawqueryresults(search);
}
ImGui::EndChild();
}
else
{
switch (tabs) {
case 0: RageBotTab(); break;
case 1: AntiAimTab(); break;
case 2: LegitBotTab(); break;
case 3: TriggerBotTab(); break;
case 4: PlayersTab(); break;
case 5: WorldTab(); break;
case 6: OtherTab(); break;
case 7: RadarTab(); break;
case 8: MiscTab(); break;
case 9: InventoryTab(); break;
case 10: ProfileTab(); break;
case 11: ScriptsTab(); break;
case 12: ConfigsTab(); break;
}
}
}
ImGui::End();
}

}


{
ImGui::SetNextWindowSize(ImVec2(x + 700, y + 550));
ImGui::Begin("", nullptr, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoBringToFrontOnFocus);
{
x = ImGui::GetWindowPos().x, y = ImGui::GetWindowPos().y;
Decoration();
Tabs();
Search();

}
ImGui::End();
}

ImGui::End();

ImGui::PopStyleColor();
ImGui::PopStyleVar();
}
Ну как бы я как понял я тебе экстрасенс? А точно, я же вижу код не глядя, точно я...
Пожалуйста, авторизуйтесь для просмотра ссылки.
 
void c_menu::draw(bool is_open)
{
static auto w = 0, h = 0, current_h = 0;
m_engine()->GetScreenSize(w, current_h);

if (h != current_h)
{
if (h)
update_scripts = true;

h = current_h;
update_dpi = true;
}

// Style
auto& s = ImGui::GetStyle();
s.FrameRounding = 6;
s.ChildRounding = 10;
s.PopupRounding = 5;
s.ScrollbarRounding = 0;
s.ScrollbarSize = 5;
s.FramePadding = ImVec2(2, 1);
// Colors
auto c = s.Colors;
c[ImGuiCol_WindowBg] = ImColor(4, 16, 30);
c[ImGuiCol_FrameBg] = ImColor(7, 35, 66);
c[ImGuiCol_FrameBgHovered] = ImColor(8, 35, 65);
c[ImGuiCol_FrameBgActive] = ImColor(77, 125, 253);
c[ImGuiCol_Separator] = ImColor(77, 125, 253);
c[ImGuiCol_SliderGrab] = ImColor(77, 125, 253, 200);
c[ImGuiCol_SliderGrabActive] = ImColor(77, 125, 253);
c[ImGuiCol_PopupBg] = ImColor(7, 35, 66);
c[ImGuiCol_ScrollbarBg] = ImColor(4, 21, 39);
c[ImGuiCol_ScrollbarGrab] = ImColor(77, 125, 253);
c[ImGuiCol_ScrollbarGrabActive] = ImColor(77, 125, 253);
c[ImGuiCol_ScrollbarGrabHovered] = ImColor(77, 125, 253, 200);
c[ImGuiCol_Border] = ImColor();
c[ImGuiCol_ChildBg] = ImColor(4, 21, 39);
c[ImGuiCol_Header] = ImColor(4, 21, 39);
c[ImGuiCol_HeaderHovered] = ImColor(77, 125, 253, 200);
c[ImGuiCol_HeaderActive] = ImColor(77, 125, 253);
c[ImGuiCol_Button] = ImColor(7, 35, 66);
c[ImGuiCol_ButtonHovered] = ImColor(77, 125, 253, 200);
c[ImGuiCol_ButtonActive] = ImColor(77, 125, 253);
c[ImGuiCol_Text] = ImColor(255, 255, 255);
c[ImGuiCol_TextDisabled] = ImColor(100, 118, 140);

static float m_alpha = 0.0002f;





m_alpha = math::clamp(m_alpha + (3.f * ImGui::GetIO().DeltaTime * (is_open ? 1.f : -1.f)), 0.0001f, 1.f);

public_alpha = m_alpha;

if (m_alpha <= 0.0001f)
return;

ImGui::PushStyleVar(ImGuiStyleVar_Alpha, m_alpha);

if (!menu_setupped)
menu_setup(ImGui::GetStyle());

ImGui::PushStyleColor(ImGuiCol_ScrollbarGrab, ImVec4(ImGui::GetStyle().Colors[ImGuiCol_ScrollbarGrab].x, ImGui::GetStyle().Colors[ImGuiCol_ScrollbarGrab].y, ImGui::GetStyle().Colors[ImGuiCol_ScrollbarGrab].z, m_alpha));




{
ImGui::PushFont(g_pMenuFont);
ImGui::BeginGroup();
{
if (animation_menu)
{
plus += 10;
if (plus >= 480)
{
plus = 480;
animation_menu = false;
}
}
ImGui::SetNextWindowPos(ImVec2(x + 170, y + 60));
ImGui::SetNextWindowSize(ImVec2(520, plus));
ImGui::Begin("##tabs", nullptr, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize);
{
if (g_Search.find && search[0] != '\0' && strlen(search) >= 3)
{
ImGui::BeginChild("Search", ImVec2(500, 460), true, ImGuiWindowFlags_NoScrollbar);
{
g_Search.drawqueryresults(search);
}
ImGui::EndChild();
}
else
{
switch (tabs) {
case 0: RageBotTab(); break;
case 1: AntiAimTab(); break;
case 2: LegitBotTab(); break;
case 3: TriggerBotTab(); break;
case 4: PlayersTab(); break;
case 5: WorldTab(); break;
case 6: OtherTab(); break;
case 7: RadarTab(); break;
case 8: MiscTab(); break;
case 9: InventoryTab(); break;
case 10: ProfileTab(); break;
case 11: ScriptsTab(); break;
case 12: ConfigsTab(); break;
}
}
}
ImGui::End();
}

}


{
ImGui::SetNextWindowSize(ImVec2(x + 700, y + 550));
ImGui::Begin("", nullptr, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoBringToFrontOnFocus);
{
x = ImGui::GetWindowPos().x, y = ImGui::GetWindowPos().y;
Decoration();
Tabs();
Search();

}
ImGui::End();
}

ImGui::End();

ImGui::PopStyleColor();
ImGui::PopStyleVar();
}

Пожалуйста, авторизуйтесь для просмотра ссылки.
забыл где то закрыть бегин
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Утя imguidemo подключен
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
скинь endscene
 
Назад
Сверху Снизу