From 416670a1749bcfd687ae2e5ffcb413e444e0dea0 Mon Sep 17 00:00:00 2001 From: Yimura Date: Sat, 2 Jan 2021 16:11:02 +0100 Subject: [PATCH] feat(GUI): Added TabSettings to Main Window --- BigBaseV2/src/gui/main_window.cpp | 1 + BigBaseV2/src/gui/tab_bar/tab_bar.hpp | 1 + BigBaseV2/src/gui/tab_bar/tab_settings.cpp | 47 ++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 BigBaseV2/src/gui/tab_bar/tab_settings.cpp diff --git a/BigBaseV2/src/gui/main_window.cpp b/BigBaseV2/src/gui/main_window.cpp index 89f29748..1b32eb9c 100644 --- a/BigBaseV2/src/gui/main_window.cpp +++ b/BigBaseV2/src/gui/main_window.cpp @@ -18,6 +18,7 @@ namespace big tabbar::render_online(); tabbar::render_misc(); tabbar::render_spawn(); + tabbar::render_settings(); 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 a017b758..998f1d56 100644 --- a/BigBaseV2/src/gui/tab_bar/tab_bar.hpp +++ b/BigBaseV2/src/gui/tab_bar/tab_bar.hpp @@ -21,6 +21,7 @@ namespace big static void render_online(); static void render_misc(); static void render_spawn(); + static void render_settings(); }; } \ No newline at end of file diff --git a/BigBaseV2/src/gui/tab_bar/tab_settings.cpp b/BigBaseV2/src/gui/tab_bar/tab_settings.cpp new file mode 100644 index 00000000..f0fddadd --- /dev/null +++ b/BigBaseV2/src/gui/tab_bar/tab_settings.cpp @@ -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()) || + ImGui::Checkbox("Ceo Ban", protections["ceo_ban"].get()) || + ImGui::Checkbox("Ceo Kick", protections["ceo_kick"].get()) || + ImGui::Checkbox("Ceo Money", protections["ceo_money"].get()) || + ImGui::Checkbox("Clear Wanted Level", protections["clear_wanted_level"].get()) || + ImGui::Checkbox("Fake Deposit", protections["fake_deposit"].get()) || + ImGui::Checkbox("Force Mission", protections["force_mission"].get()) || + ImGui::Checkbox("GTA Banner", protections["gta_banner"].get()) || + ImGui::Checkbox("Kick", protections["kick"].get()) || + ImGui::Checkbox("Personal Vehicle Destroyed", protections["personal_vehicle_destroyed"].get()) || + ImGui::Checkbox("Remote Off Radar", protections["remote_off_radar"].get()) || + ImGui::Checkbox("Rotate Cam", protections["rotate_cam"].get()) || + ImGui::Checkbox("Send To Cutscene", protections["send_to_cutscene"].get()) || + ImGui::Checkbox("Send To Island", protections["send_to_island"].get()) || + ImGui::Checkbox("Sound Spam", protections["sound_spam"].get()) || + ImGui::Checkbox("Spectate", protections["spectate"].get()) || + ImGui::Checkbox("Force Teleport", protections["force_teleport"].get()) || + ImGui::Checkbox("Transaction Error", protections["transaction_error"].get()) || + ImGui::Checkbox("Vehicle Kick", protections["vehicle_kick"].get()) + ) { 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(); + } + } +} \ No newline at end of file