2022-10-26 14:12:29 +02:00
|
|
|
#include "views/view.hpp"
|
2022-05-04 19:16:40 +02:00
|
|
|
#include "fiber_pool.hpp"
|
|
|
|
#include "util/session.hpp"
|
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
2022-07-06 11:59:08 +02:00
|
|
|
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");
|
2022-07-06 11:59:08 +02:00
|
|
|
if (ImGui::ListBoxHeader("###session_switch"))
|
2022-05-04 19:16:40 +02:00
|
|
|
{
|
2022-07-06 11:59:08 +02:00
|
|
|
for (const auto& session_type : sessions)
|
|
|
|
{
|
2022-10-26 14:12:29 +02:00
|
|
|
components::selectable(session_type.name, false, [&session_type]
|
2022-10-19 00:30:32 +02:00
|
|
|
{
|
|
|
|
session::join_type(session_type.id);
|
2022-07-06 11:59:08 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
ImGui::EndListBox();
|
2022-05-04 19:16:40 +02:00
|
|
|
}
|
2022-10-26 15:38:01 -04:00
|
|
|
if (ImGui::TreeNode("Chat"))
|
|
|
|
{
|
|
|
|
ImGui::Checkbox("Disable Filter", &g->session.disable_chat_filter);
|
|
|
|
|
|
|
|
ImGui::TreePop();
|
|
|
|
}
|
2022-05-04 19:16:40 +02:00
|
|
|
}
|
2022-10-26 14:12:29 +02:00
|
|
|
}
|