From a98f93b2128a5a254fe66828a01f89dc7c357c98 Mon Sep 17 00:00:00 2001 From: Yimura Date: Sat, 26 Dec 2020 17:13:41 +0100 Subject: [PATCH] feat(GUI): Added tab teleport --- BigBaseV2/src/gui/main_window.cpp | 1 + BigBaseV2/src/gui/tab_bar/tab_bar.hpp | 1 + BigBaseV2/src/gui/tab_bar/tab_teleport.cpp | 55 ++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 BigBaseV2/src/gui/tab_bar/tab_teleport.cpp diff --git a/BigBaseV2/src/gui/main_window.cpp b/BigBaseV2/src/gui/main_window.cpp index de38aa34..46c845d6 100644 --- a/BigBaseV2/src/gui/main_window.cpp +++ b/BigBaseV2/src/gui/main_window.cpp @@ -12,6 +12,7 @@ namespace big ImGui::BeginTabBar("tabbar"); tabbar::render_self(); tabbar::render_tunables(); + tabbar::render_teleport(); ImGui::EndTabBar(); } ImGui::End(); diff --git a/BigBaseV2/src/gui/tab_bar/tab_bar.hpp b/BigBaseV2/src/gui/tab_bar/tab_bar.hpp index e6cb30ff..4de83b38 100644 --- a/BigBaseV2/src/gui/tab_bar/tab_bar.hpp +++ b/BigBaseV2/src/gui/tab_bar/tab_bar.hpp @@ -14,6 +14,7 @@ namespace big public: static void render_self(); static void render_tunables(); + static void render_teleport(); }; } \ No newline at end of file diff --git a/BigBaseV2/src/gui/tab_bar/tab_teleport.cpp b/BigBaseV2/src/gui/tab_bar/tab_teleport.cpp new file mode 100644 index 00000000..bc7967d1 --- /dev/null +++ b/BigBaseV2/src/gui/tab_bar/tab_teleport.cpp @@ -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(); + } + } +} \ No newline at end of file