From cc9ad89258f0e1d6d25d48c04371367186a12c4d Mon Sep 17 00:00:00 2001 From: Yimura Date: Fri, 23 Jul 2021 11:59:31 +0200 Subject: [PATCH] feat(Tabs): Added recovery tab with set level --- .../src/gui/window/main/tab_recovery.cpp | 25 +++++++++++++++++++ BigBaseV2/src/gui/window/main/tabs.hpp | 1 + BigBaseV2/src/gui/window/window_main.cpp | 1 + 3 files changed, 27 insertions(+) create mode 100644 BigBaseV2/src/gui/window/main/tab_recovery.cpp diff --git a/BigBaseV2/src/gui/window/main/tab_recovery.cpp b/BigBaseV2/src/gui/window/main/tab_recovery.cpp new file mode 100644 index 00000000..a365f540 --- /dev/null +++ b/BigBaseV2/src/gui/window/main/tab_recovery.cpp @@ -0,0 +1,25 @@ +#include "fiber_pool.hpp" +#include "tabs.hpp" +#include "script.hpp" +#include "util/player.hpp" + +namespace big +{ + void tab_main::tab_recovery() + { + if (ImGui::BeginTabItem("Recovery")) + { + ImGui::Text("Set Current Character Level:"); + ImGui::SliderInt("##input_levels_self", &g.player.set_level, 0, 8000); + if (ImGui::Button("Set Level")) + { + QUEUE_JOB_BEGIN_CLAUSE() + { + player::set_player_level(g.player.set_level); + }QUEUE_JOB_END_CLAUSE + } + + ImGui::EndTabItem(); + } + } +} \ No newline at end of file diff --git a/BigBaseV2/src/gui/window/main/tabs.hpp b/BigBaseV2/src/gui/window/main/tabs.hpp index a66790f9..8289cc00 100644 --- a/BigBaseV2/src/gui/window/main/tabs.hpp +++ b/BigBaseV2/src/gui/window/main/tabs.hpp @@ -7,6 +7,7 @@ namespace big class tab_main { public: static void tab_self(); + static void tab_recovery(); static void tab_spawn(); static void tab_vehicle(); static void tab_weapons(); diff --git a/BigBaseV2/src/gui/window/window_main.cpp b/BigBaseV2/src/gui/window/window_main.cpp index ba4675ba..089efced 100644 --- a/BigBaseV2/src/gui/window/window_main.cpp +++ b/BigBaseV2/src/gui/window/window_main.cpp @@ -15,6 +15,7 @@ namespace big tab_main::tab_teleport(); tab_main::tab_vehicle(); tab_main::tab_weapons(); + tab_main::tab_recovery(); ImGui::EndTabBar(); ImGui::End();