Исходник Простенькое превью для визуалов

Эксперт
Статус
Оффлайн
Регистрация
13 Сен 2020
Сообщения
1,414
Реакции[?]
710
Поинты[?]
7K
Пожалуйста, авторизуйтесь для просмотра ссылки.

Код:
static bool box = false;
    static bool health = false;
    static bool name = false;
    static bool weapon = false;
    static bool hitbox = false;
    static bool head = false;
    static bool rhand = false;
    static bool lhand = false;
    static bool body = false;
    static bool rleg = false;
    static bool lleg = false;
    static int boxrounding = 0;
    static int boxthickness = 0;
    static int healththickness = 0;

    if (tabs == 2)
    {
        draw->AddRectFilled(ImVec2(pos.x + 760, pos.y + 55), ImVec2(pos.x + 1000, pos.y + 450), ImColor(255, 255, 255), 4);
        ImGui::SetCursorPos(ImVec2(765, 165));
        ImGui::Image(hummman, ImVec2(233, 233));

        ImGui::SetCursorPos(ImVec2(150, 65));
        ImGui::BeginChild("Visuals", ImVec2(1000, 500));
        {
            ImGui::SetCursorPos(ImVec2(0, 30));
            ImGui::BeginGroup();
            {
                ImGui::Checkbox("Box", &box);
                if (box)
                {
                    ImGui::SliderInt("Box rounding", &boxrounding, 0, 35);
                    ImGui::SliderInt("Box thickess", &boxthickness, 0, 10);
                        draw->AddRect(ImVec2(pos.x + 810, pos.y + 160), ImVec2(pos.x + 950, pos.y + 400), ImColor(0, 0, 0), boxrounding, 15, boxthickness);
                }
                ImGui::Checkbox("Health", &health);
                if (health)
                {
                    ImGui::SliderInt("Health thickness", &healththickness, 0, 10);
                    draw->AddLine(ImVec2(pos.x + 800, pos.y + 160), ImVec2(pos.x + 800, pos.y + 400), ImColor(51, 255, 51), healththickness);
                }
                ImGui::Checkbox("Name", &name);
                if (name)
                    draw->AddText(ImVec2(pos.x + 860, pos.y + 135), ImColor(0, 0, 0), "Name");
                ImGui::Checkbox("Weapon", &weapon);
                if (weapon)
                {
                    draw->AddText(ImVec2(pos.x + 860, pos.y + 410), ImColor(0, 0, 0), "Weapon");
                }
                ImGui::Checkbox("Hitbox", &hitbox);
                if (hitbox)
                {
                    ImGui::SetCursorPos(ImVec2(727, 129));
                    ImGui::Hitbox("Head", &head);
                    ImGui::SetCursorPos(ImVec2(727, 210));
                    ImGui::Hitbox("Body", &body);
                    ImGui::SetCursorPos(ImVec2(695, 240));
                    ImGui::Hitbox("LHand", &lhand);
                    ImGui::SetCursorPos(ImVec2(760, 240));
                    ImGui::Hitbox("RHand", &rhand);
                    ImGui::SetCursorPos(ImVec2(715, 300));
                    ImGui::Hitbox("LLeg", &lleg);
                    ImGui::SetCursorPos(ImVec2(740, 300));
                    ImGui::Hitbox("RLeg", &rleg);
                }

            }
            ImGui::EndGroup();
        }
        ImGui::EndChild();
    }
 
kira yoshikage
Пользователь
Статус
Оффлайн
Регистрация
21 Янв 2020
Сообщения
887
Реакции[?]
115
Поинты[?]
2K
Пожалуйста, авторизуйтесь для просмотра ссылки.

Код:
static bool box = false;
    static bool health = false;
    static bool name = false;
    static bool weapon = false;
    static bool hitbox = false;
    static bool head = false;
    static bool rhand = false;
    static bool lhand = false;
    static bool body = false;
    static bool rleg = false;
    static bool lleg = false;
    static int boxrounding = 0;
    static int boxthickness = 0;
    static int healththickness = 0;

    if (tabs == 2)
    {
        draw->AddRectFilled(ImVec2(pos.x + 760, pos.y + 55), ImVec2(pos.x + 1000, pos.y + 450), ImColor(255, 255, 255), 4);
        ImGui::SetCursorPos(ImVec2(765, 165));
        ImGui::Image(hummman, ImVec2(233, 233));

        ImGui::SetCursorPos(ImVec2(150, 65));
        ImGui::BeginChild("Visuals", ImVec2(1000, 500));
        {
            ImGui::SetCursorPos(ImVec2(0, 30));
            ImGui::BeginGroup();
            {
                ImGui::Checkbox("Box", &box);
                if (box)
                {
                    ImGui::SliderInt("Box rounding", &boxrounding, 0, 35);
                    ImGui::SliderInt("Box thickess", &boxthickness, 0, 10);
                        draw->AddRect(ImVec2(pos.x + 810, pos.y + 160), ImVec2(pos.x + 950, pos.y + 400), ImColor(0, 0, 0), boxrounding, 15, boxthickness);
                }
                ImGui::Checkbox("Health", &health);
                if (health)
                {
                    ImGui::SliderInt("Health thickness", &healththickness, 0, 10);
                    draw->AddLine(ImVec2(pos.x + 800, pos.y + 160), ImVec2(pos.x + 800, pos.y + 400), ImColor(51, 255, 51), healththickness);
                }
                ImGui::Checkbox("Name", &name);
                if (name)
                    draw->AddText(ImVec2(pos.x + 860, pos.y + 135), ImColor(0, 0, 0), "Name");
                ImGui::Checkbox("Weapon", &weapon);
                if (weapon)
                {
                    draw->AddText(ImVec2(pos.x + 860, pos.y + 410), ImColor(0, 0, 0), "Weapon");
                }
                ImGui::Checkbox("Hitbox", &hitbox);
                if (hitbox)
                {
                    ImGui::SetCursorPos(ImVec2(727, 129));
                    ImGui::Hitbox("Head", &head);
                    ImGui::SetCursorPos(ImVec2(727, 210));
                    ImGui::Hitbox("Body", &body);
                    ImGui::SetCursorPos(ImVec2(695, 240));
                    ImGui::Hitbox("LHand", &lhand);
                    ImGui::SetCursorPos(ImVec2(760, 240));
                    ImGui::Hitbox("RHand", &rhand);
                    ImGui::SetCursorPos(ImVec2(715, 300));
                    ImGui::Hitbox("LLeg", &lleg);
                    ImGui::SetCursorPos(ImVec2(740, 300));
                    ImGui::Hitbox("RLeg", &rleg);
                }

            }
            ImGui::EndGroup();
        }
        ImGui::EndChild();
    }
так то привью сделать изи но для людей которые не шарят в имгуи пригодится :CoolCat:
 
Пользователь
Статус
Оффлайн
Регистрация
19 Окт 2018
Сообщения
473
Реакции[?]
33
Поинты[?]
0
Пожалуйста, авторизуйтесь для просмотра ссылки.

Код:
static bool box = false;
    static bool health = false;
    static bool name = false;
    static bool weapon = false;
    static bool hitbox = false;
    static bool head = false;
    static bool rhand = false;
    static bool lhand = false;
    static bool body = false;
    static bool rleg = false;
    static bool lleg = false;
    static int boxrounding = 0;
    static int boxthickness = 0;
    static int healththickness = 0;

    if (tabs == 2)
    {
        draw->AddRectFilled(ImVec2(pos.x + 760, pos.y + 55), ImVec2(pos.x + 1000, pos.y + 450), ImColor(255, 255, 255), 4);
        ImGui::SetCursorPos(ImVec2(765, 165));
        ImGui::Image(hummman, ImVec2(233, 233));

        ImGui::SetCursorPos(ImVec2(150, 65));
        ImGui::BeginChild("Visuals", ImVec2(1000, 500));
        {
            ImGui::SetCursorPos(ImVec2(0, 30));
            ImGui::BeginGroup();
            {
                ImGui::Checkbox("Box", &box);
                if (box)
                {
                    ImGui::SliderInt("Box rounding", &boxrounding, 0, 35);
                    ImGui::SliderInt("Box thickess", &boxthickness, 0, 10);
                        draw->AddRect(ImVec2(pos.x + 810, pos.y + 160), ImVec2(pos.x + 950, pos.y + 400), ImColor(0, 0, 0), boxrounding, 15, boxthickness);
                }
                ImGui::Checkbox("Health", &health);
                if (health)
                {
                    ImGui::SliderInt("Health thickness", &healththickness, 0, 10);
                    draw->AddLine(ImVec2(pos.x + 800, pos.y + 160), ImVec2(pos.x + 800, pos.y + 400), ImColor(51, 255, 51), healththickness);
                }
                ImGui::Checkbox("Name", &name);
                if (name)
                    draw->AddText(ImVec2(pos.x + 860, pos.y + 135), ImColor(0, 0, 0), "Name");
                ImGui::Checkbox("Weapon", &weapon);
                if (weapon)
                {
                    draw->AddText(ImVec2(pos.x + 860, pos.y + 410), ImColor(0, 0, 0), "Weapon");
                }
                ImGui::Checkbox("Hitbox", &hitbox);
                if (hitbox)
                {
                    ImGui::SetCursorPos(ImVec2(727, 129));
                    ImGui::Hitbox("Head", &head);
                    ImGui::SetCursorPos(ImVec2(727, 210));
                    ImGui::Hitbox("Body", &body);
                    ImGui::SetCursorPos(ImVec2(695, 240));
                    ImGui::Hitbox("LHand", &lhand);
                    ImGui::SetCursorPos(ImVec2(760, 240));
                    ImGui::Hitbox("RHand", &rhand);
                    ImGui::SetCursorPos(ImVec2(715, 300));
                    ImGui::Hitbox("LLeg", &lleg);
                    ImGui::SetCursorPos(ImVec2(740, 300));
                    ImGui::Hitbox("RLeg", &rleg);
                }

            }
            ImGui::EndGroup();
        }
        ImGui::EndChild();
    }
можно человечка который в байтах?
 
Забаненный
Статус
Оффлайн
Регистрация
21 Дек 2020
Сообщения
16
Реакции[?]
17
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Очень даже неплохо! молодец
 
Сверху Снизу