feat(GUI): Added TabSettings to Main Window

This commit is contained in:
Yimura 2021-01-02 16:11:02 +01:00
parent 72b20e3e61
commit 416670a174
No known key found for this signature in database
GPG Key ID: 54EFAD29393A6E78
3 changed files with 49 additions and 0 deletions

View File

@ -18,6 +18,7 @@ namespace big
tabbar::render_online();
tabbar::render_misc();
tabbar::render_spawn();
tabbar::render_settings();
ImGui::EndTabBar();
}
ImGui::End();

View File

@ -21,6 +21,7 @@ namespace big
static void render_online();
static void render_misc();
static void render_spawn();
static void render_settings();
};
}

View File

@ -0,0 +1,47 @@
#include "tab_bar.hpp"
namespace big
{
void tabbar::render_settings()
{
if (ImGui::BeginTabItem("Settings"))
{
if (ImGui::TreeNode("Protections"))
{
auto &protections = g_settings.options["settings"]["protections"];
if (
ImGui::Checkbox("Bounty", protections["bounty"].get<bool*>()) ||
ImGui::Checkbox("Ceo Ban", protections["ceo_ban"].get<bool*>()) ||
ImGui::Checkbox("Ceo Kick", protections["ceo_kick"].get<bool*>()) ||
ImGui::Checkbox("Ceo Money", protections["ceo_money"].get<bool*>()) ||
ImGui::Checkbox("Clear Wanted Level", protections["clear_wanted_level"].get<bool*>()) ||
ImGui::Checkbox("Fake Deposit", protections["fake_deposit"].get<bool*>()) ||
ImGui::Checkbox("Force Mission", protections["force_mission"].get<bool*>()) ||
ImGui::Checkbox("GTA Banner", protections["gta_banner"].get<bool*>()) ||
ImGui::Checkbox("Kick", protections["kick"].get<bool*>()) ||
ImGui::Checkbox("Personal Vehicle Destroyed", protections["personal_vehicle_destroyed"].get<bool*>()) ||
ImGui::Checkbox("Remote Off Radar", protections["remote_off_radar"].get<bool*>()) ||
ImGui::Checkbox("Rotate Cam", protections["rotate_cam"].get<bool*>()) ||
ImGui::Checkbox("Send To Cutscene", protections["send_to_cutscene"].get<bool*>()) ||
ImGui::Checkbox("Send To Island", protections["send_to_island"].get<bool*>()) ||
ImGui::Checkbox("Sound Spam", protections["sound_spam"].get<bool*>()) ||
ImGui::Checkbox("Spectate", protections["spectate"].get<bool*>()) ||
ImGui::Checkbox("Force Teleport", protections["force_teleport"].get<bool*>()) ||
ImGui::Checkbox("Transaction Error", protections["transaction_error"].get<bool*>()) ||
ImGui::Checkbox("Vehicle Kick", protections["vehicle_kick"].get<bool*>())
) { g_settings.save(); }
if (ImGui::Button("Enable All"))
features::functions::toggle_protections(true);
ImGui::SameLine();
if (ImGui::Button("Disable All"))
features::functions::toggle_protections(false);
ImGui::TreePop();
}
ImGui::EndTabItem();
}
}
}