mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-07-01 12:02:55 +08:00
General improvements (#1693)
* remove(replay): remove replay interface * fix(context_menu): better console controls * feat(protections): improve protections * feat(protections): actually fix parachute crash * feat(protections): kick rejoin * feat(context_menu): more context menu stuff
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
#include "gta/pools.hpp"
|
||||
#include "gta_util.hpp"
|
||||
#include "gui.hpp"
|
||||
#include "pointers.hpp"
|
||||
@ -77,28 +78,28 @@ namespace big
|
||||
ImGui::Text("Pos: %.2f, %.2f, %.2f", pos.x, pos.y, pos.z);
|
||||
}
|
||||
|
||||
// can't easily get used item count using pools, so keeping replay interface for now
|
||||
if (auto replay_interface = *g_pointers->m_gta.m_replay_interface; g.window.ingame_overlay.show_replay_interface)
|
||||
if (g.window.ingame_overlay.show_replay_interface)
|
||||
{
|
||||
if (replay_interface->m_ped_interface || replay_interface->m_vehicle_interface || replay_interface->m_object_interface)
|
||||
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)
|
||||
ImGui::Separator();
|
||||
|
||||
if (replay_interface->m_ped_interface)
|
||||
if (*g_pointers->m_gta.m_ped_pool)
|
||||
ImGui::Text(std::format("Ped Pool: {}/{}",
|
||||
replay_interface->m_ped_interface->m_cur_peds,
|
||||
replay_interface->m_ped_interface->m_max_peds)
|
||||
(*g_pointers->m_gta.m_ped_pool)->get_item_count(),
|
||||
(*g_pointers->m_gta.m_ped_pool)->m_size)
|
||||
.c_str());
|
||||
|
||||
if (replay_interface->m_vehicle_interface)
|
||||
if (*g_pointers->m_gta.m_vehicle_pool && **g_pointers->m_gta.m_vehicle_pool)
|
||||
ImGui::Text(std::format("Vehicle Pool: {}/{}",
|
||||
replay_interface->m_vehicle_interface->m_cur_vehicles,
|
||||
replay_interface->m_vehicle_interface->m_max_vehicles)
|
||||
(**g_pointers->m_gta.m_vehicle_pool)->m_item_count,
|
||||
(**g_pointers->m_gta.m_vehicle_pool)->m_size)
|
||||
.c_str());
|
||||
|
||||
if (replay_interface->m_object_interface)
|
||||
if (*g_pointers->m_gta.m_prop_pool)
|
||||
ImGui::Text(std::format("Object Pool: {}/{}",
|
||||
replay_interface->m_object_interface->m_cur_objects,
|
||||
replay_interface->m_object_interface->m_max_objects)
|
||||
(*g_pointers->m_gta.m_prop_pool)->get_item_count(),
|
||||
(*g_pointers->m_gta.m_prop_pool)->m_size)
|
||||
.c_str());
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,8 @@ namespace big
|
||||
|
||||
ImGui::EndDisabled();
|
||||
|
||||
components::script_patch_checkbox("REVEAL_OTR_PLAYERS"_T, &g.session.decloak_players);
|
||||
components::script_patch_checkbox("REVEAL_OTR_PLAYERS"_T, &g.session.decloak_players, "Reveals players that are off the radar");
|
||||
components::script_patch_checkbox("Reveal Hidden Players", &g.session.unhide_players_from_player_list, "Reveals players that have hidden themselves from the player list");
|
||||
|
||||
ImGui::EndListBox();
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ namespace big
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("This prevents the collection of pickups such as unwanted money bags\nNote: Normal pickups are also no longer possible to collect with this enabled");
|
||||
ImGui::Checkbox("ADMIN_CHECK"_T.data(), &g.protections.admin_check);
|
||||
ImGui::Checkbox("Kick Rejoin", &g.protections.kick_rejoin);
|
||||
ImGui::EndGroup();
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,7 @@ namespace big
|
||||
|
||||
void draw_reaction(reaction& reaction)
|
||||
{
|
||||
ImGui::PushID(&reaction);
|
||||
if (ImGui::TreeNode(reaction.m_event_name))
|
||||
{
|
||||
ImGui::Checkbox("REACTION_CHAT"_T.data(), &reaction.announce_in_chat);
|
||||
@ -25,11 +26,13 @@ namespace big
|
||||
ImGui::Checkbox("REACTION_KICK_PLAYER"_T.data(), &reaction.kick);
|
||||
ImGui::TreePop();
|
||||
}
|
||||
ImGui::PopID();
|
||||
}
|
||||
|
||||
// TODO code duplication
|
||||
void draw_interloper_reaction(interloper_reaction& reaction)
|
||||
{
|
||||
ImGui::PushID(&reaction);
|
||||
if (ImGui::TreeNode(reaction.m_event_name))
|
||||
{
|
||||
ImGui::Checkbox("REACTION_CHAT"_T.data(), &reaction.announce_in_chat);
|
||||
@ -51,6 +54,7 @@ namespace big
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
ImGui::PopID();
|
||||
}
|
||||
|
||||
void view::reaction_settings()
|
||||
@ -77,6 +81,7 @@ namespace big
|
||||
draw_reaction(g.reactions.rotate_cam);
|
||||
draw_reaction(g.reactions.send_to_cutscene);
|
||||
draw_reaction(g.reactions.send_to_location);
|
||||
draw_reaction(g.reactions.send_to_interior);
|
||||
draw_reaction(g.reactions.sound_spam);
|
||||
draw_reaction(g.reactions.spectate_notification);
|
||||
draw_reaction(g.reactions.start_activity);
|
||||
@ -98,6 +103,8 @@ namespace big
|
||||
draw_reaction(g.reactions.report);
|
||||
draw_reaction(g.reactions.report_cash_spawn);
|
||||
draw_reaction(g.reactions.request_control_event);
|
||||
draw_reaction(g.reactions.spectate);
|
||||
draw_interloper_reaction(g.reactions.spectate_others);
|
||||
ImGui::Separator();
|
||||
draw_reaction(g.reactions.gamer_instruction_kick);
|
||||
|
||||
|
Reference in New Issue
Block a user