Вопрос ImGui Font

Начинающий
Статус
Оффлайн
Регистрация
5 Фев 2023
Сообщения
168
Реакции[?]
18
Поинты[?]
21K

Source kierohook CS:GO

Main.cpp:
long __stdcall hkEndScene(LPDIRECT3DDEVICE9 pDevice)
{

    ImGui::CreateContext();
    ImGuiIO& io = ImGui::GetIO();

    io.Fonts->AddFontFromMemoryTTF(&IconFont, sizeof IconFont, 40, nullptr, io.Fonts->GetGlyphRangesCyrillic());
    Logo = io.Fonts->AddFontFromMemoryTTF(&IconFont, sizeof IconFont, 40, nullptr, io.Fonts->GetGlyphRangesCyrillic());
    Icons = io.Fonts->AddFontFromMemoryTTF(&IconFont, sizeof IconFont, 28, nullptr, io.Fonts->GetGlyphRangesCyrillic());
    Tabs = io.Fonts->AddFontFromMemoryTTF(&MediumFont, sizeof MediumFont, 17, nullptr, io.Fonts->GetGlyphRangesCyrillic());
    Child = io.Fonts->AddFontFromMemoryTTF(&SemiBold, sizeof SemiBold, 22, nullptr, io.Fonts->GetGlyphRangesCyrillic());
    Elements = io.Fonts->AddFontFromMemoryTTF(&SemiBold, sizeof SemiBold, 17, nullptr, io.Fonts->GetGlyphRangesCyrillic());
    SubElements = io.Fonts->AddFontFromMemoryTTF(&SemiBold, sizeof SemiBold, 12, nullptr, io.Fonts->GetGlyphRangesCyrillic());

    ImGui_ImplWin32_Init(window);
    ImGui_ImplDX9_Init(pDevice);
    HVNWARE::InitStyles();

    RECT screen_rect;
    GetWindowRect(GetDesktopWindow(), &screen_rect);

    auto x = float(screen_rect.right - width) / 2.f;
    auto y = float(screen_rect.bottom - height) / 2.f;

    ImGui_ImplDX9_NewFrame();
    ImGui_ImplWin32_NewFrame();
    ImGui::NewFrame();
    {
        ImGui::SetNextWindowPos(ImVec2(x, y), ImGuiCond_Once);
        ImGui::SetNextWindowSize(ImVec2(width, height), ImGuiCond_Once);
        ImGui::Begin("CS:GO HVN", nullptr, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoTitleBar);
        {
            ImGui::SetCursorPos(ImVec2(-2, 65));
            ImGui::BeginGroup();
            {
                HVNWARE::tab("1", 1, "Legitbot");
                ImGui::Spacing();
                HVNWARE::tab("6", 2, "Visuals");
                ImGui::Spacing();
                HVNWARE::tab("5", 3, "Misc");
                ImGui::Spacing();
                HVNWARE::tab("2", 4, "Configs");
            }
            ImGui::EndGroup();
            switch (active_tab) {
            case 1:

                ImGui::SetCursorPos(ImVec2(102, 35));
                HVNWARE::RenderFunctionChild("Legitbot", ImVec2(306, 218));
                ImGui::SetCursorPos(ImVec2(112, 76));
                ImGui::BeginGroup();
                {
                    ImGui::Button("Enable sexbot");
                }
                ImGui::EndGroup();
                break;

            case 2:

                ImGui::SetCursorPos(ImVec2(102, 35));
                HVNWARE::RenderFunctionChild("Visuals", ImVec2(306, 218));
                ImGui::SetCursorPos(ImVec2(112, 76));
                ImGui::BeginGroup();
                {
                    ImGui::Button("Enable visuals");
                }
                ImGui::EndGroup();
                break;

            case 3:

                ImGui::SetCursorPos(ImVec2(102, 35));
                HVNWARE::RenderFunctionChild("Misc", ImVec2(306, 218));
                ImGui::SetCursorPos(ImVec2(112, 76));
                ImGui::BeginGroup();
                {
                    if (ImGui::Button("Unload", ImVec2(90, 23)))
                    {
                        unload = true; {
                            exit(1);
                        }
                    }

                }

                ImGui::EndGroup();
                break;

            case 4:

                ImGui::SetCursorPos(ImVec2(102, 35));
                HVNWARE::RenderFunctionChild("Configs", ImVec2(306, 218));
                ImGui::SetCursorPos(ImVec2(112, 76));
                ImGui::BeginGroup();
                {
                    ImGui::Text("</> Comming soon </>");
                }
                ImGui::EndGroup();
                break;
            }
        }
        ImGui::End();
    }
    ImGui::EndFrame();
    ImGui::Render();
    ImGui_ImplDX9_RenderDrawData(ImGui::GetDrawData());

    return oEndScene(pDevice);
}
 
Последнее редактирование:
Начинающий
Статус
Оффлайн
Регистрация
5 Фев 2023
Сообщения
168
Реакции[?]
18
Поинты[?]
21K
Для просмотра содержимого вам необходимо авторизоваться.


#include "includes.h"
#include "elements.h"

#ifdef _WIN64
#define GWL_WNDPROC GWLP_WNDPROC
#endif

extern LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);

EndScene oEndScene = NULL;
WNDPROC oWndProc;
static HWND window = NULL;

static bool unload = false;
static bool init = false;
static int width = 550;
static int height = 330;

long __stdcall hkEndScene(LPDIRECT3DDEVICE9 pDevice)
{

ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO();

io.Fonts->AddFontFromMemoryTTF(&IconFont, sizeof IconFont, 40, nullptr, io.Fonts->GetGlyphRangesCyrillic());
Logo = io.Fonts->AddFontFromMemoryTTF(&IconFont, sizeof IconFont, 40, nullptr, io.Fonts->GetGlyphRangesCyrillic());
Icons = io.Fonts->AddFontFromMemoryTTF(&IconFont, sizeof IconFont, 28, nullptr, io.Fonts->GetGlyphRangesCyrillic());
Tabs = io.Fonts->AddFontFromMemoryTTF(&MediumFont, sizeof MediumFont, 17, nullptr, io.Fonts->GetGlyphRangesCyrillic());
Child = io.Fonts->AddFontFromMemoryTTF(&SemiBold, sizeof SemiBold, 22, nullptr, io.Fonts->GetGlyphRangesCyrillic());
Elements = io.Fonts->AddFontFromMemoryTTF(&SemiBold, sizeof SemiBold, 17, nullptr, io.Fonts->GetGlyphRangesCyrillic());
SubElements = io.Fonts->AddFontFromMemoryTTF(&SemiBold, sizeof SemiBold, 12, nullptr, io.Fonts->GetGlyphRangesCyrillic());

ImGui_ImplWin32_Init(window);
ImGui_ImplDX9_Init(pDevice);
HVNWARE::InitStyles();

RECT screen_rect;
GetWindowRect(GetDesktopWindow(), &screen_rect);

auto x = float(screen_rect.right - width) / 2.f;
auto y = float(screen_rect.bottom - height) / 2.f;

ImGui_ImplDX9_NewFrame();
ImGui_ImplWin32_NewFrame();
ImGui::NewFrame();
{
ImGui::SetNextWindowPos(ImVec2(x, y), ImGuiCond_Once);
ImGui::SetNextWindowSize(ImVec2(width, height), ImGuiCond_Once);
ImGui::Begin("CS:GO HVN", nullptr, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoTitleBar);
{
ImGui::SetCursorPos(ImVec2(-2, 65));
ImGui::BeginGroup();
{
HVNWARE::tab("1", 1, "Legitbot");
ImGui::Spacing();
HVNWARE::tab("6", 2, "Visuals");
ImGui::Spacing();
HVNWARE::tab("5", 3, "Misc");
ImGui::Spacing();
HVNWARE::tab("2", 4, "Configs");
}
ImGui::EndGroup();
switch (active_tab) {
case 1:

ImGui::SetCursorPos(ImVec2(102, 35));
HVNWARE::RenderFunctionChild("Legitbot", ImVec2(306, 218));
ImGui::SetCursorPos(ImVec2(112, 76));
ImGui::BeginGroup();
{
ImGui::Button("Enable sexbot");
}
ImGui::EndGroup();
break;

case 2:

ImGui::SetCursorPos(ImVec2(102, 35));
HVNWARE::RenderFunctionChild("Visuals", ImVec2(306, 218));
ImGui::SetCursorPos(ImVec2(112, 76));
ImGui::BeginGroup();
{
ImGui::Button("Enable visuals");
}
ImGui::EndGroup();
break;

case 3:

ImGui::SetCursorPos(ImVec2(102, 35));
HVNWARE::RenderFunctionChild("Misc", ImVec2(306, 218));
ImGui::SetCursorPos(ImVec2(112, 76));
ImGui::BeginGroup();
{
if (ImGui::Button("Unload", ImVec2(90, 23)))
{
unload = true; {
exit(1);
}
}

}

ImGui::EndGroup();
break;

case 4:

ImGui::SetCursorPos(ImVec2(102, 35));
HVNWARE::RenderFunctionChild("Configs", ImVec2(306, 218));
ImGui::SetCursorPos(ImVec2(112, 76));
ImGui::BeginGroup();
{
ImGui::Text("</> Comming soon </>");
}
ImGui::EndGroup();
break;
}
}
ImGui::End();
}
ImGui::EndFrame();
ImGui::Render();
ImGui_ImplDX9_RenderDrawData(ImGui::GetDrawData());

return oEndScene(pDevice);
}
 
ЧВК EB_LAN
Забаненный
Статус
Оффлайн
Регистрация
12 Сен 2021
Сообщения
425
Реакции[?]
121
Поинты[?]
162K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
сделай пуш фонт и в конце после имгуи енд имгуи поп фонт
 
Сверху Снизу