feat(GUI): Added network tab

This commit is contained in:
Yimura 2020-12-26 17:36:11 +01:00
parent 6aff16e057
commit 104036c063
3 changed files with 37 additions and 0 deletions

View File

@ -14,6 +14,7 @@ namespace big
tabbar::render_tunables();
tabbar::render_teleport();
tabbar::render_vehicle();
tabbar::render_network();
ImGui::EndTabBar();
}
ImGui::End();

View File

@ -16,6 +16,7 @@ namespace big
static void render_tunables();
static void render_teleport();
static void render_vehicle();
static void render_network();
};
}

View File

@ -0,0 +1,35 @@
#pragma once
#include "tab_bar.hpp"
#include "pointers.hpp"
#include "script_global.hpp"
namespace big
{
void tabbar::render_network()
{
if (ImGui::BeginTabItem("Network"))
{
ImGui::Text("Time: ");
ImGui::SliderInt("Hour:", &g_temp.time.hour, 0, 23);
ImGui::SliderInt("Minutes:", &g_temp.time.minutes, 0, 59);
if (ImGui::Button("Apply"))
{
QUEUE_JOB_BEGIN_CLAUSE(= )
{
NETWORK::NETWORK_OVERRIDE_CLOCK_TIME(g_temp.time.hour, g_temp.time.minutes, 0);
g_pointers->m_sync_local_time(1, 0);
}QUEUE_JOB_END_CLAUSE
}
ImGui::Separator();
if (ImGui::Checkbox("Spoof Online Rank", g_settings.options["spoof_rank"].get<bool*>()))
g_settings.save();
if (ImGui::InputInt("Spoof Online Rank", (PINT)g_settings.options["rank"].get<int64_t*>(), 1, 50))
g_settings.save();
ImGui::EndTabItem();
}
}
}