2023-01-03 16:48:32 +00:00
|
|
|
#include "views/view.hpp"
|
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
|
|
|
void draw_pair_option(const std::string_view name, decltype(g.notifications.gta_thread_kill)& option)
|
|
|
|
{
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Text(name.data());
|
2023-01-03 16:48:32 +00:00
|
|
|
|
|
|
|
ImGui::PushID(name.data());
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("LOG"_T.data(), &option.log);
|
|
|
|
ImGui::Checkbox("NOTIFY"_T.data(), &option.notify);
|
2023-01-03 16:48:32 +00:00
|
|
|
ImGui::PopID();
|
|
|
|
}
|
|
|
|
|
|
|
|
void draw_reaction(reaction& reaction)
|
|
|
|
{
|
|
|
|
if (ImGui::TreeNode(reaction.m_event_name))
|
|
|
|
{
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("REACTION_CHAT"_T.data(), &reaction.announce_in_chat);
|
|
|
|
ImGui::Checkbox("NOTIFY"_T.data(), &reaction.notify);
|
|
|
|
ImGui::Checkbox("LOG"_T.data(), &reaction.log);
|
|
|
|
ImGui::Checkbox("REACTION_ADD_TO_DATABASE"_T.data(), &reaction.add_to_player_db);
|
2023-01-03 16:48:32 +00:00
|
|
|
if (reaction.add_to_player_db)
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("REACTION_BLOCK_JOINS"_T.data(), &reaction.block_joins);
|
|
|
|
ImGui::Checkbox("REACTION_KICK_PLAYER"_T.data(), &reaction.kick);
|
2023-01-03 16:48:32 +00:00
|
|
|
ImGui::TreePop();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// TODO code duplication
|
|
|
|
void draw_interloper_reaction(interloper_reaction& reaction)
|
|
|
|
{
|
|
|
|
if (ImGui::TreeNode(reaction.m_event_name))
|
|
|
|
{
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("REACTION_CHAT"_T.data(), &reaction.announce_in_chat);
|
|
|
|
ImGui::Checkbox("NOTIFY"_T.data(), &reaction.notify);
|
|
|
|
ImGui::Checkbox("LOG"_T.data(), &reaction.log);
|
|
|
|
ImGui::Checkbox("REACTION_ADD_TO_DATABASE"_T.data(), &reaction.add_to_player_db);
|
2023-01-03 16:48:32 +00:00
|
|
|
if (reaction.add_to_player_db)
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("REACTION_BLOCK_JOINS"_T.data(), &reaction.block_joins);
|
|
|
|
ImGui::Checkbox("REACTION_KICK_ATTACKER"_T.data(), &reaction.kick);
|
2023-01-03 16:48:32 +00:00
|
|
|
|
|
|
|
if (reaction.m_blockable || reaction.m_karmaable)
|
|
|
|
ImGui::Separator();
|
|
|
|
|
|
|
|
if (reaction.m_blockable)
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("BLOCK"_T.data(), &reaction.block);
|
2023-01-03 16:48:32 +00:00
|
|
|
|
|
|
|
if (reaction.m_karmaable)
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("KARMA"_T.data(), &reaction.karma);
|
2023-01-03 16:48:32 +00:00
|
|
|
|
|
|
|
ImGui::TreePop();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void view::reaction_settings()
|
|
|
|
{
|
2023-02-01 19:46:33 +01:00
|
|
|
components::title("SETTINGS_REACTIONS"_T);
|
2023-01-03 16:48:32 +00:00
|
|
|
draw_reaction(g.reactions.bounty);
|
2023-01-22 21:57:32 +00:00
|
|
|
draw_reaction(g.reactions.ceo_kick);
|
2023-01-03 16:48:32 +00:00
|
|
|
draw_reaction(g.reactions.ceo_money);
|
|
|
|
draw_reaction(g.reactions.clear_wanted_level);
|
|
|
|
draw_reaction(g.reactions.crash);
|
2023-01-22 21:57:32 +00:00
|
|
|
draw_reaction(g.reactions.end_session_kick);
|
2023-01-03 16:48:32 +00:00
|
|
|
draw_reaction(g.reactions.destroy_personal_vehicle);
|
|
|
|
draw_reaction(g.reactions.fake_deposit);
|
|
|
|
draw_reaction(g.reactions.force_mission);
|
|
|
|
draw_reaction(g.reactions.force_teleport);
|
|
|
|
draw_reaction(g.reactions.give_collectible);
|
|
|
|
draw_reaction(g.reactions.gta_banner);
|
2023-01-22 21:57:32 +00:00
|
|
|
draw_reaction(g.reactions.kick_from_interior);
|
2023-01-03 16:48:32 +00:00
|
|
|
draw_reaction(g.reactions.mc_teleport);
|
|
|
|
draw_reaction(g.reactions.network_bail);
|
|
|
|
draw_reaction(g.reactions.null_function_kick);
|
|
|
|
draw_reaction(g.reactions.personal_vehicle_destroyed);
|
|
|
|
draw_reaction(g.reactions.remote_off_radar);
|
|
|
|
draw_reaction(g.reactions.rotate_cam);
|
|
|
|
draw_reaction(g.reactions.send_to_cutscene);
|
|
|
|
draw_reaction(g.reactions.send_to_location);
|
|
|
|
draw_reaction(g.reactions.sound_spam);
|
|
|
|
draw_reaction(g.reactions.spectate_notification);
|
|
|
|
draw_reaction(g.reactions.start_activity);
|
2023-01-22 21:57:32 +00:00
|
|
|
draw_reaction(g.reactions.start_script);
|
2023-01-03 16:48:32 +00:00
|
|
|
draw_reaction(g.reactions.teleport_to_warehouse);
|
|
|
|
draw_reaction(g.reactions.transaction_error);
|
2023-01-22 21:57:32 +00:00
|
|
|
draw_reaction(g.reactions.trigger_business_raid);
|
2023-01-03 16:48:32 +00:00
|
|
|
draw_reaction(g.reactions.tse_freeze);
|
|
|
|
draw_reaction(g.reactions.tse_sender_mismatch);
|
|
|
|
draw_reaction(g.reactions.vehicle_kick);
|
2023-01-22 21:57:32 +00:00
|
|
|
draw_reaction(g.reactions.turn_into_beast);
|
|
|
|
draw_reaction(g.reactions.remote_wanted_level);
|
|
|
|
draw_interloper_reaction(g.reactions.remote_wanted_level_others);
|
2023-01-03 16:48:32 +00:00
|
|
|
ImGui::Separator();
|
|
|
|
draw_reaction(g.reactions.clear_ped_tasks);
|
|
|
|
draw_reaction(g.reactions.remote_ragdoll);
|
|
|
|
draw_reaction(g.reactions.kick_vote);
|
|
|
|
draw_reaction(g.reactions.modder_detection);
|
|
|
|
draw_reaction(g.reactions.report);
|
|
|
|
draw_reaction(g.reactions.report_cash_spawn);
|
|
|
|
draw_reaction(g.reactions.request_control_event);
|
|
|
|
ImGui::Separator();
|
|
|
|
draw_reaction(g.reactions.gamer_instruction_kick);
|
|
|
|
draw_interloper_reaction(g.reactions.breakup_others);
|
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
components::title("SETTINGS_NOTIFICATIONS"_T);
|
|
|
|
components::sub_title("SETTINGS_NOTIFY_GTA_THREADS"_T);
|
2023-01-03 16:48:32 +00:00
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
draw_pair_option("SETTINGS_NOTIFY_GTA_THREADS_TERMINATE"_T, g.notifications.gta_thread_kill);
|
|
|
|
draw_pair_option("SETTINGS_NOTIFY_GTA_THREADS_START"_T, g.notifications.gta_thread_start);
|
2023-01-03 16:48:32 +00:00
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
components::sub_title("SETTINGS_NOTIFY_PLAYER_MGR"_T);
|
2023-01-03 16:48:32 +00:00
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Text("SETTINGS_NOTIFY_PLAYER_JOIN"_T.data());
|
2023-01-03 16:48:32 +00:00
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("SETTINGS_NOTIFY_PLAYER_JOIN_ABOVE_MAP"_T.data(), &g.notifications.player_join.above_map);
|
|
|
|
ImGui::Checkbox("LOG"_T.data(), &g.notifications.player_join.log);
|
|
|
|
ImGui::Checkbox("NOTIFY"_T.data(), &g.notifications.player_join.notify);
|
2023-01-03 16:48:32 +00:00
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
draw_pair_option("SETTINGS_NOTIFY_PLAYER_LEAVE"_T, g.notifications.player_leave);
|
2023-01-03 16:48:32 +00:00
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
draw_pair_option("SETTINGS_NOTIFY_PLAYER_MGR_INIT"_T, g.notifications.network_player_mgr_init);
|
|
|
|
draw_pair_option("SETTINGS_NOTIFY_PLAYER_MGR_SHUTDOWN"_T, g.notifications.network_player_mgr_shutdown);
|
2023-01-03 16:48:32 +00:00
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
components::sub_title("SETTINGS_NOTIFY_OTHER"_T);
|
2023-01-03 16:48:32 +00:00
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
draw_pair_option("SETTINGS_NOTIFY_TRANSACTION_RATE_LIMIT"_T, g.notifications.transaction_rate_limit);
|
|
|
|
draw_pair_option("SETTINGS_NOTIFY_MISMATCH_SYNC_TYPE"_T, g.notifications.mismatch_sync_type);
|
|
|
|
draw_pair_option("SETTINGS_NOTIFY_OUT_OF_ALLOWED_RANGE_SYNC_TYPE"_T, g.notifications.out_of_allowed_range_sync_type);
|
|
|
|
draw_pair_option("SETTINGS_NOTIFY_INVALID_SYNC"_T, g.notifications.invalid_sync);
|
2023-01-03 16:48:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|