feat(Tabs): Added recovery tab with set level

This commit is contained in:
Yimura 2021-07-23 11:59:31 +02:00
parent 4d81856de0
commit cc9ad89258
3 changed files with 27 additions and 0 deletions

View File

@ -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();
}
}
}

View File

@ -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();

View File

@ -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();