2023-07-12 17:03:29 +00:00
|
|
|
#include "gta/pools.hpp"
|
2023-01-31 00:21:29 +01:00
|
|
|
#include "gta_util.hpp"
|
|
|
|
#include "gui.hpp"
|
2023-03-01 21:27:15 +00:00
|
|
|
#include "pointers.hpp"
|
|
|
|
#include "views/view.hpp"
|
2023-01-31 00:21:29 +01:00
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
|
|
|
void view::overlay()
|
|
|
|
{
|
|
|
|
if (!g.window.ingame_overlay.opened || (g_gui->is_open() && !g.window.ingame_overlay.show_with_menu_opened))
|
2023-03-01 21:27:15 +00:00
|
|
|
return;
|
2023-01-31 00:21:29 +01:00
|
|
|
|
2023-06-23 06:43:44 +00:00
|
|
|
g_gui->push_theme_colors();
|
|
|
|
|
2023-01-31 00:21:29 +01:00
|
|
|
ImGui::SetNextWindowPos(ImVec2(10.0f, 10.0f), ImGuiCond_FirstUseEver, ImVec2(0.0f, 0.0f));
|
2023-02-04 00:00:56 +01:00
|
|
|
ImGui::SetNextWindowBgAlpha(0.5f);
|
2023-01-31 00:21:29 +01:00
|
|
|
|
2023-07-05 23:54:06 +02:00
|
|
|
auto window_flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav;
|
|
|
|
if (!g_gui->is_open())
|
|
|
|
{
|
|
|
|
window_flags |= ImGuiWindowFlags_NoMouseInputs;
|
|
|
|
}
|
|
|
|
if (ImGui::Begin("overlay", nullptr, window_flags))
|
2023-01-31 00:21:29 +01:00
|
|
|
{
|
|
|
|
ImGui::Text("YimMenu");
|
|
|
|
|
|
|
|
ImGui::Separator();
|
|
|
|
|
|
|
|
if (g.window.ingame_overlay.show_fps)
|
|
|
|
ImGui::Text("%.0f FPS", ImGui::GetIO().Framerate / 2);
|
|
|
|
|
2023-03-01 21:27:15 +00:00
|
|
|
if (CNetworkPlayerMgr* network_player_mgr = gta_util::get_network_player_mgr(); g.window.ingame_overlay.show_players)
|
|
|
|
ImGui::Text(std::format("Players: {}/{}", network_player_mgr->m_player_count, network_player_mgr->m_player_limit)
|
|
|
|
.c_str());
|
2023-01-31 00:21:29 +01:00
|
|
|
|
2023-07-03 14:20:27 +02:00
|
|
|
if (g.window.ingame_overlay.show_indicators)
|
|
|
|
{
|
|
|
|
ImGui::Separator();
|
|
|
|
|
|
|
|
if (g.window.ingame_overlay_indicators.show_player_godmode)
|
|
|
|
components::overlay_indicator("Player Godmode", g.self.god_mode);
|
|
|
|
|
|
|
|
if (g.window.ingame_overlay_indicators.show_off_radar)
|
|
|
|
components::overlay_indicator("Off Radar", g.self.off_radar);
|
|
|
|
|
|
|
|
if (g.window.ingame_overlay_indicators.show_vehicle_godmode)
|
|
|
|
components::overlay_indicator("Vehicle Godmode", g.vehicle.god_mode);
|
|
|
|
|
|
|
|
if (g.window.ingame_overlay_indicators.show_never_wanted)
|
|
|
|
components::overlay_indicator("Never Wanted", g.self.never_wanted);
|
|
|
|
|
|
|
|
if (g.window.ingame_overlay_indicators.show_infinite_ammo)
|
|
|
|
components::overlay_indicator("Infinite Ammo", g.weapons.infinite_ammo);
|
|
|
|
|
2023-07-05 17:29:07 -04:00
|
|
|
if (g.window.ingame_overlay_indicators.show_always_full_ammo)
|
|
|
|
components::overlay_indicator("Always Full Ammo", g.weapons.always_full_ammo);
|
|
|
|
|
2023-07-03 14:20:27 +02:00
|
|
|
if (g.window.ingame_overlay_indicators.show_infinite_mag)
|
|
|
|
components::overlay_indicator("Infinite Magazine", g.weapons.infinite_mag);
|
|
|
|
|
|
|
|
if (g.window.ingame_overlay_indicators.show_aimbot)
|
|
|
|
components::overlay_indicator("Aimbot", g.weapons.aimbot.enable);
|
|
|
|
|
|
|
|
if (g.window.ingame_overlay_indicators.show_triggerbot)
|
|
|
|
components::overlay_indicator("Triggerbot", g.weapons.triggerbot);
|
2023-07-05 23:51:19 +02:00
|
|
|
|
|
|
|
if (g.window.ingame_overlay_indicators.show_invisibility)
|
|
|
|
components::overlay_indicator("Invisibility", g.self.invisibility);
|
2023-07-03 14:20:27 +02:00
|
|
|
}
|
|
|
|
|
2023-06-23 06:43:44 +00:00
|
|
|
if (g.window.ingame_overlay.show_position && g_local_player)
|
|
|
|
{
|
|
|
|
ImGui::Separator();
|
|
|
|
|
|
|
|
auto& pos = *g_local_player->get_position();
|
|
|
|
|
|
|
|
ImGui::Text("Pos: %.2f, %.2f, %.2f", pos.x, pos.y, pos.z);
|
|
|
|
}
|
|
|
|
|
2023-07-12 17:03:29 +00:00
|
|
|
if (g.window.ingame_overlay.show_replay_interface)
|
2023-01-31 00:21:29 +01:00
|
|
|
{
|
2023-07-12 17:03:29 +00:00
|
|
|
if (*g_pointers->m_gta.m_ped_pool || (*g_pointers->m_gta.m_vehicle_pool && **g_pointers->m_gta.m_vehicle_pool)
|
|
|
|
|| *g_pointers->m_gta.m_prop_pool)
|
2023-06-23 13:44:06 +05:00
|
|
|
ImGui::Separator();
|
2023-01-31 00:21:29 +01:00
|
|
|
|
2023-07-12 17:03:29 +00:00
|
|
|
if (*g_pointers->m_gta.m_ped_pool)
|
2023-03-01 21:27:15 +00:00
|
|
|
ImGui::Text(std::format("Ped Pool: {}/{}",
|
2023-07-12 17:03:29 +00:00
|
|
|
(*g_pointers->m_gta.m_ped_pool)->get_item_count(),
|
|
|
|
(*g_pointers->m_gta.m_ped_pool)->m_size)
|
2023-03-01 21:27:15 +00:00
|
|
|
.c_str());
|
|
|
|
|
2023-07-12 17:03:29 +00:00
|
|
|
if (*g_pointers->m_gta.m_vehicle_pool && **g_pointers->m_gta.m_vehicle_pool)
|
2023-03-01 21:27:15 +00:00
|
|
|
ImGui::Text(std::format("Vehicle Pool: {}/{}",
|
2023-07-12 17:03:29 +00:00
|
|
|
(**g_pointers->m_gta.m_vehicle_pool)->m_item_count,
|
|
|
|
(**g_pointers->m_gta.m_vehicle_pool)->m_size)
|
2023-03-01 21:27:15 +00:00
|
|
|
.c_str());
|
2023-01-31 00:21:29 +01:00
|
|
|
|
2023-07-12 17:03:29 +00:00
|
|
|
if (*g_pointers->m_gta.m_prop_pool)
|
2023-03-01 21:27:15 +00:00
|
|
|
ImGui::Text(std::format("Object Pool: {}/{}",
|
2023-07-12 17:03:29 +00:00
|
|
|
(*g_pointers->m_gta.m_prop_pool)->get_item_count(),
|
|
|
|
(*g_pointers->m_gta.m_prop_pool)->m_size)
|
2023-03-01 21:27:15 +00:00
|
|
|
.c_str());
|
2023-01-31 00:21:29 +01:00
|
|
|
}
|
2023-03-01 21:27:15 +00:00
|
|
|
|
2023-01-31 00:21:29 +01:00
|
|
|
if (g.window.ingame_overlay.show_game_versions)
|
|
|
|
{
|
|
|
|
ImGui::Separator();
|
2023-04-16 18:28:49 +00:00
|
|
|
ImGui::Text(std::format("Game Version: {}", g_pointers->m_gta.m_game_version).c_str());
|
|
|
|
ImGui::Text(std::format("Online Version: {}", g_pointers->m_gta.m_online_version).c_str());
|
2023-01-31 00:21:29 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
ImGui::End();
|
2023-06-23 06:43:44 +00:00
|
|
|
|
|
|
|
g_gui->pop_theme_colors();
|
2023-01-31 00:21:29 +01:00
|
|
|
}
|
2023-02-07 07:41:40 +08:00
|
|
|
}
|