HRESULT __stdcall hooked::EndScene(IDirect3DDevice9* device)
{
if (!ctx.m_init)
{
ctx.m_renderer = std::make_unique<c_render>(device);
ctx.m_init = true;
}
if (!init)
{
InitImGui(device);
init = true;
}
if (!g_Search.find)
g_Search.Init();
/*if (GetAsyncKeyState(VK_END)) {
kiero::shutdown();
return 0;
}*/
if (GetAsyncKeyState(VK_INSERT) & 1)
{
show = !show;
}
if (show) {
ImGui_ImplDX9_NewFrame();
ImGui_ImplWin32_NewFrame();
ImGui::NewFrame();
{
auto& styles = ImGui::GetStyle();
styles.FrameRounding = 6;
styles.ChildRounding = 10;
styles.PopupRounding = 5;
ImGui::SetNextWindowSize(ImVec2(gs));
if (ImGui::Begin(("###"), nullptr, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoScrollbar))
{
s = ImVec2(ImGui::GetWindowSize().x - ImGui::GetStyle().WindowPadding.x * 2, ImGui::GetWindowSize().y - ImGui::GetStyle().WindowPadding.y * 2);
p = ImVec2(ImGui::GetWindowPos().x + ImGui::GetStyle().WindowPadding.x, ImGui::GetWindowPos().y + ImGui::GetStyle().WindowPadding.y);
ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(p.x, p.y), ImVec2(p.x + 863, p.y + 610), ImColor(29, 29, 29), 10); //фон
ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(p.x, p.y), ImVec2(p.x + 863, p.y + 55), ImColor(41, 41, 41), 10, 3); //верхняя серая полоска
ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(p.x, p.y + 540), ImVec2(p.x + 863, p.y + 70 + 540), ImColor(41, 41, 41), 10, 12); //нижняя серая полоска
ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(p.x, p.y + 56), ImVec2(p.x + 144, p.y + 539), ImColor(34, 34, 34)); //боковая серая полоска для суб табов
ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(p.x + 144, p.y + 56), ImVec2(p.x + 145, p.y + 539), ImColor(41, 41, 41)); //первая тень боковой полосы
ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(p.x + 145, p.y + 56), ImVec2(p.x + 146, p.y + 539), ImColor(23, 23, 23)); //вторая тень боковой полосы
ImGui::GetWindowDrawList()->AddImage(plogo, ImVec2(p.x + 11, p.y + 7), ImVec2(p.x + 11 + 147, p.y + 7 + 38)); //лого чита
ImGui::GetWindowDrawList()->AddRect(ImVec2(p.x, p.y), ImVec2(p.x + 863, p.y + 610), ImColor(41, 41, 41), 10); //обводка меню
ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(p.x, p.y + 55), ImVec2(p.x + 863, p.y + 56), ImColor(193, 154, 164)); //верхняя розовая линия
ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(p.x, p.y + 539), ImVec2(p.x + 863, p.y + 540), ImColor(193, 154, 164)); //нижная розовая линия
Search();
//other
{
render_tab();
render_subtab();
}
}
ImGui::End();
}
// Rendering
ImGui::EndFrame();
ImGui::Render();
ImGui_ImplDX9_RenderDrawData(ImGui::GetDrawData());
return hooked::original::oEndScene(device);
}
}