From e026f8e97deaf31cff22ee819e63dcdf4d5e58de Mon Sep 17 00:00:00 2001 From: Yimura Date: Sat, 26 Dec 2020 16:47:27 +0100 Subject: [PATCH] feat(GUI): Added Tunables tab --- BigBaseV2/src/gui/main_window.cpp | 1 + BigBaseV2/src/gui/tab_bar/tab_bar.hpp | 3 +-- BigBaseV2/src/gui/tab_bar/tab_tunables.cpp | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 BigBaseV2/src/gui/tab_bar/tab_tunables.cpp diff --git a/BigBaseV2/src/gui/main_window.cpp b/BigBaseV2/src/gui/main_window.cpp index 0da7734f..de38aa34 100644 --- a/BigBaseV2/src/gui/main_window.cpp +++ b/BigBaseV2/src/gui/main_window.cpp @@ -11,6 +11,7 @@ namespace big { ImGui::BeginTabBar("tabbar"); tabbar::render_self(); + tabbar::render_tunables(); 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 b2594318..e6cb30ff 100644 --- a/BigBaseV2/src/gui/tab_bar/tab_bar.hpp +++ b/BigBaseV2/src/gui/tab_bar/tab_bar.hpp @@ -9,12 +9,11 @@ namespace big { - using namespace features; - class tabbar { public: static void render_self(); + static void render_tunables(); }; } \ No newline at end of file diff --git a/BigBaseV2/src/gui/tab_bar/tab_tunables.cpp b/BigBaseV2/src/gui/tab_bar/tab_tunables.cpp new file mode 100644 index 00000000..b4f17a1c --- /dev/null +++ b/BigBaseV2/src/gui/tab_bar/tab_tunables.cpp @@ -0,0 +1,17 @@ +#include "tab_bar.hpp" +#include "pointers.hpp" +#include "script_global.hpp" + +namespace big +{ + void tabbar::render_tunables() + { + if (ImGui::BeginTabItem("Tunables")) + { + if (ImGui::Checkbox("No Idle Kick", g_settings.options["no_idle_kick"].get())) + g_settings.save(); + + ImGui::EndTabItem(); + } + } +} \ No newline at end of file