feat(Top Bar): Added function to join specific session types

This commit is contained in:
Yimura 2020-12-29 23:28:30 +01:00
parent df107a18c6
commit 531bf7a6a7
No known key found for this signature in database
GPG Key ID: 54EFAD29393A6E78
3 changed files with 38 additions and 0 deletions

View File

@ -56,6 +56,22 @@ namespace big
ImGui::EndMenu();
}
if (ImGui::BeginMenu("Session"))
{
for (uint8_t i = 0; i < IM_ARRAYSIZE(sessions); i++)
{
if (ImGui::MenuItem(sessions[i].descr))
{
QUEUE_JOB_BEGIN_CLAUSE(=)
{
features::functions::join_session_type(sessions[i]);
}QUEUE_JOB_END_CLAUSE
}
}
ImGui::EndMenu();
}
if (ImGui::BeginMenu("Quit"))
{
if (ImGui::MenuItem("Unload Menu (may crash)"))

View File

@ -1,4 +1,5 @@
#pragma once
#include "session_type.hpp"
namespace big
{
@ -42,4 +43,17 @@ namespace big
"SNOWLIGHT",
"BLIZZARD"
};
inline session_type sessions[] = {
{ 0, "Join Public Session" },
{ 1, "New Public Session" },
{ 2, "Closed Crew Session" },
{ 3, "Crew Session" },
{ 6, "Closed Friend Session" },
{ 9, "Find Friend Session" },
{ 10, "Solo Session" },
{ 11, "Invite Only Session" },
{ 12, "Join Crew Session" },
{ -1, "Leave GTA Online" }
};
}

View File

@ -0,0 +1,8 @@
namespace big
{
struct session_type
{
int id = 0;
char descr[32];
};
}