mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-23 17:12:35 +08:00
Added spawn ped feature. (#377)
This commit is contained in:
@ -3,13 +3,12 @@
|
||||
#include "services/players/player_service.hpp"
|
||||
#include "views/view.hpp"
|
||||
#include "fonts/fonts.hpp"
|
||||
#include <renderer.hpp>
|
||||
#include <natives.hpp>
|
||||
#include "natives.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
|
||||
#define IMGUI_DEFINE_PLACEMENT_NEW
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
#include <imgui_internal.h>
|
||||
#include "fiber_pool.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -38,7 +37,7 @@ namespace big
|
||||
|
||||
// calculate icons width
|
||||
ImGuiWindow* window = ImGui::GetCurrentWindow();
|
||||
ImGui::PushFont(g_renderer->m_font_icons);
|
||||
ImGui::PushFont(g->window.font_icon);
|
||||
ImVec2 iconsSize = ImGui::CalcTextSize(playerIconsCStr, playerIconsCStr + playerIcons.size());
|
||||
ImVec2 iconsPos(window->DC.CursorPos.x + 300.0f - 32.0f - iconsSize.x, window->DC.CursorPos.y + 2.0f);
|
||||
ImRect iconsBox(iconsPos, iconsPos + iconsSize);
|
||||
@ -46,7 +45,9 @@ namespace big
|
||||
|
||||
|
||||
if (playerSelected)
|
||||
{
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.29f, 0.45f, 0.69f, 1.f));
|
||||
}
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, { 0.0, 0.5 });
|
||||
ImGui::PushID(plyr->id());
|
||||
@ -63,7 +64,7 @@ namespace big
|
||||
ImGui::PopStyleColor();
|
||||
|
||||
// render icons on top of the player button
|
||||
ImGui::PushFont(g_renderer->m_font_icons);
|
||||
ImGui::PushFont(g->window.font_icon);
|
||||
ImGui::RenderTextWrapped(iconsBox.Min, playerIconsCStr, playerIconsCStr + playerIcons.size(), iconsSize.x);
|
||||
ImGui::PopFont();
|
||||
}
|
||||
|
Reference in New Issue
Block a user