This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/src/views/network/view_session.cpp

52 lines
1.3 KiB
C++
Raw Normal View History

2022-10-26 14:12:29 +02:00
#include "views/view.hpp"
#include "fiber_pool.hpp"
#include "util/session.hpp"
2022-11-12 07:13:01 +08:00
#include "core/data/region_codes.hpp"
namespace big
{
void view::session()
{
2022-10-26 14:12:29 +02:00
static uint64_t rid = 0;
ImGui::InputScalar("Input RID", ImGuiDataType_U64, &rid);
components::button("Join RID", []
{
session::join_by_rockstar_id(rid);
});
2022-08-10 08:42:34 +08:00
components::sub_title("Session Switcher");
if (ImGui::ListBoxHeader("###session_switch"))
{
for (const auto& session_type : sessions)
{
2022-10-26 14:12:29 +02:00
components::selectable(session_type.name, false, [&session_type]
{
session::join_type(session_type.id);
});
}
ImGui::EndListBox();
}
2022-11-12 07:13:01 +08:00
components::sub_title("Region Switcher");
if (ImGui::ListBoxHeader("###region_switch"))
{
for (const auto& region_type : regions)
{
components::selectable(region_type.name, *g_pointers->m_region_code == region_type.id, [&region_type]
{
*g_pointers->m_region_code = region_type.id;
});
}
ImGui::EndListBox();
}
components::sub_title("Chat");
ImGui::Checkbox("Disable Filter", &g->session.disable_chat_filter);
ImGui::Checkbox("Log Chat Messages", &g->session.log_chat_messages);
ImGui::Checkbox("Log Text Messages", &g->session.log_text_messages);
components::sub_title("Decloak");
components::script_patch_checkbox("Reveal OTR Players", &g->session.decloak_players);
}
2022-10-26 14:12:29 +02:00
}