feat(GUI): Added tab teleport

This commit is contained in:
Yimura 2020-12-26 17:13:41 +01:00
parent 2f6c6d6e04
commit a98f93b212
No known key found for this signature in database
GPG Key ID: 54EFAD29393A6E78
3 changed files with 57 additions and 0 deletions

View File

@ -12,6 +12,7 @@ namespace big
ImGui::BeginTabBar("tabbar");
tabbar::render_self();
tabbar::render_tunables();
tabbar::render_teleport();
ImGui::EndTabBar();
}
ImGui::End();

View File

@ -14,6 +14,7 @@ namespace big
public:
static void render_self();
static void render_tunables();
static void render_teleport();
};
}

View File

@ -0,0 +1,55 @@
#include "tab_bar.hpp"
namespace big
{
void tabbar::render_teleport()
{
if (ImGui::BeginTabItem("Teleport"))
{
if (ImGui::Button("Waypoint"))
{
QUEUE_JOB_BEGIN_CLAUSE()
{
if (features::teleport::waypoint())
{
features::notify::above_map("You've been teleported.");
}
else
{
features::notify::above_map("No waypoint set.");
}
} QUEUE_JOB_END_CLAUSE
}
if (ImGui::Button("Objective"))
{
QUEUE_JOB_BEGIN_CLAUSE()
{
features::teleport::teleport_to_blip(1, 5);
}QUEUE_JOB_END_CLAUSE
}
ImGui::Text("Personal Vehicle: ");
ImGui::SameLine();
if (ImGui::Button("Teleport##pv"))
{
QUEUE_JOB_BEGIN_CLAUSE()
{
features::teleport::teleport_to_blip(225);
}QUEUE_JOB_END_CLAUSE
}
ImGui::SameLine();
if (ImGui::Button("Bring##pv"))
{
QUEUE_JOB_BEGIN_CLAUSE()
{
features::teleport::bring_blip(225, 0);
}QUEUE_JOB_END_CLAUSE
}
ImGui::EndTabItem();
}
}
}