From 8d57289ad1b008dbfcbd817722e0881fef9eb6ed Mon Sep 17 00:00:00 2001 From: The-Denno <97184968+The-Denno@users.noreply.github.com> Date: Wed, 5 Jan 2022 18:22:06 +0100 Subject: [PATCH 1/2] Update tab_settings.cpp feat(settings): added checkboxes to enable and disable protections in tab_settings.cpp --- .../src/gui/window/main/tab_settings.cpp | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/BigBaseV2/src/gui/window/main/tab_settings.cpp b/BigBaseV2/src/gui/window/main/tab_settings.cpp index e8a26831..b5716239 100644 --- a/BigBaseV2/src/gui/window/main/tab_settings.cpp +++ b/BigBaseV2/src/gui/window/main/tab_settings.cpp @@ -6,7 +6,25 @@ namespace big { if (ImGui::BeginTabItem("Settings")) { - ImGui::Text("No settings to be modified as of now"); + ImGui::Text("Protections:"); + + ImGui::Checkbox("Bounty", &g.protections.script_events.bounty); + ImGui::Checkbox("CEO Ban", &g.protections.script_events.ceo_ban); + ImGui::Checkbox("CEO Kick", &g.protections.script_events.ceo_kick); + ImGui::Checkbox("CEO Money", &g.protections.script_events.ceo_money); + ImGui::Checkbox("Wanted Level", &g.protections.script_events.clear_wanted_level); + ImGui::Checkbox("Fake Deposit", &g.protections.script_events.fake_deposit); + ImGui::Checkbox("Force Mission", &g.protections.script_events.force_mission); + ImGui::Checkbox("Force Teleport", &g.protections.script_events.force_teleport); + ImGui::Checkbox("GTA Banner", &g.protections.script_events.gta_banner); + ImGui::Checkbox("Destroy Personal Vehicle", &g.protections.script_events.personal_vehicle_destroyed); + ImGui::Checkbox("Remote Off Radar", &g.protections.script_events.remote_off_radar); + ImGui::Checkbox("Send to Cutscene", &g.protections.script_events.send_to_cutscene); + ImGui::Checkbox("Send to Island", &g.protections.script_events.send_to_island); + ImGui::Checkbox("Sound Spam", &g.protections.script_events.sound_spam); + ImGui::Checkbox("Spectate", &g.protections.script_events.spectate); + ImGui::Checkbox("Transaction Error", &g.protections.script_events.transaction_error); + ImGui::Checkbox("Vehicle Kick", &g.protections.script_events.vehicle_kick); ImGui::EndTabItem(); } From 4f87d2846417a40d11f5009c0454d272890518bf Mon Sep 17 00:00:00 2001 From: The-Denno <97184968+The-Denno@users.noreply.github.com> Date: Wed, 5 Jan 2022 18:43:03 +0100 Subject: [PATCH 2/2] Update tab_settings.cpp fix(GUI): using ImGui::TreeNode and ImGui::TreePop in settings.cpp --- .../src/gui/window/main/tab_settings.cpp | 41 ++++++++++--------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/BigBaseV2/src/gui/window/main/tab_settings.cpp b/BigBaseV2/src/gui/window/main/tab_settings.cpp index b5716239..70b5be7d 100644 --- a/BigBaseV2/src/gui/window/main/tab_settings.cpp +++ b/BigBaseV2/src/gui/window/main/tab_settings.cpp @@ -6,26 +6,29 @@ namespace big { if (ImGui::BeginTabItem("Settings")) { - ImGui::Text("Protections:"); - - ImGui::Checkbox("Bounty", &g.protections.script_events.bounty); - ImGui::Checkbox("CEO Ban", &g.protections.script_events.ceo_ban); - ImGui::Checkbox("CEO Kick", &g.protections.script_events.ceo_kick); - ImGui::Checkbox("CEO Money", &g.protections.script_events.ceo_money); - ImGui::Checkbox("Wanted Level", &g.protections.script_events.clear_wanted_level); - ImGui::Checkbox("Fake Deposit", &g.protections.script_events.fake_deposit); - ImGui::Checkbox("Force Mission", &g.protections.script_events.force_mission); - ImGui::Checkbox("Force Teleport", &g.protections.script_events.force_teleport); - ImGui::Checkbox("GTA Banner", &g.protections.script_events.gta_banner); - ImGui::Checkbox("Destroy Personal Vehicle", &g.protections.script_events.personal_vehicle_destroyed); - ImGui::Checkbox("Remote Off Radar", &g.protections.script_events.remote_off_radar); - ImGui::Checkbox("Send to Cutscene", &g.protections.script_events.send_to_cutscene); - ImGui::Checkbox("Send to Island", &g.protections.script_events.send_to_island); - ImGui::Checkbox("Sound Spam", &g.protections.script_events.sound_spam); - ImGui::Checkbox("Spectate", &g.protections.script_events.spectate); - ImGui::Checkbox("Transaction Error", &g.protections.script_events.transaction_error); - ImGui::Checkbox("Vehicle Kick", &g.protections.script_events.vehicle_kick); + if (ImGui::TreeNode("Protections")) + { + ImGui::Checkbox("Bounty", &g.protections.script_events.bounty); + ImGui::Checkbox("CEO Ban", &g.protections.script_events.ceo_ban); + ImGui::Checkbox("CEO Kick", &g.protections.script_events.ceo_kick); + ImGui::Checkbox("CEO Money", &g.protections.script_events.ceo_money); + ImGui::Checkbox("Wanted Level", &g.protections.script_events.clear_wanted_level); + ImGui::Checkbox("Fake Deposit", &g.protections.script_events.fake_deposit); + ImGui::Checkbox("Force Mission", &g.protections.script_events.force_mission); + ImGui::Checkbox("Force Teleport", &g.protections.script_events.force_teleport); + ImGui::Checkbox("GTA Banner", &g.protections.script_events.gta_banner); + ImGui::Checkbox("Destroy Personal Vehicle", &g.protections.script_events.personal_vehicle_destroyed); + ImGui::Checkbox("Remote Off Radar", &g.protections.script_events.remote_off_radar); + ImGui::Checkbox("Send to Cutscene", &g.protections.script_events.send_to_cutscene); + ImGui::Checkbox("Send to Island", &g.protections.script_events.send_to_island); + ImGui::Checkbox("Sound Spam", &g.protections.script_events.sound_spam); + ImGui::Checkbox("Spectate", &g.protections.script_events.spectate); + ImGui::Checkbox("Transaction Error", &g.protections.script_events.transaction_error); + ImGui::Checkbox("Vehicle Kick", &g.protections.script_events.vehicle_kick); + ImGui::TreePop(); + } + ImGui::EndTabItem(); } }