49 lines
1.2 KiB
C++
49 lines
1.2 KiB
C++
#include "views/view.hpp"
|
|
#include "fiber_pool.hpp"
|
|
#include "util/session.hpp"
|
|
#include "core/data/region_codes.hpp"
|
|
|
|
namespace big
|
|
{
|
|
void view::session()
|
|
{
|
|
static uint64_t rid = 0;
|
|
ImGui::InputScalar("Input RID", ImGuiDataType_U64, &rid);
|
|
components::button("Join RID", []
|
|
{
|
|
session::join_by_rockstar_id(rid);
|
|
});
|
|
|
|
components::sub_title("Session Switcher");
|
|
if (ImGui::ListBoxHeader("###session_switch"))
|
|
{
|
|
for (const auto& session_type : sessions)
|
|
{
|
|
components::selectable(session_type.name, false, [&session_type]
|
|
{
|
|
session::join_type(session_type.id);
|
|
});
|
|
}
|
|
ImGui::EndListBox();
|
|
}
|
|
|
|
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, [®ion_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);
|
|
}
|
|
}
|