diff --git a/BigBaseV2/src/core/globals.hpp b/BigBaseV2/src/core/globals.hpp index 9ac4a131..e69b8e50 100644 --- a/BigBaseV2/src/core/globals.hpp +++ b/BigBaseV2/src/core/globals.hpp @@ -26,9 +26,14 @@ struct globals { char vehicle_gun_model[12] = "bus"; }; + struct window { + bool main = true; + }; + self self{}; vehicle vehicle{}; weapons weapons{}; + window window{}; void from_json(const nlohmann::json& j) { diff --git a/BigBaseV2/src/gui/window/window_main.cpp b/BigBaseV2/src/gui/window/window_main.cpp index 96636562..192ad01f 100644 --- a/BigBaseV2/src/gui/window/window_main.cpp +++ b/BigBaseV2/src/gui/window/window_main.cpp @@ -7,7 +7,7 @@ namespace big void window::main() { ImGui::SetNextWindowSize({ 800, 840 }, ImGuiCond_FirstUseEver); - if (ImGui::Begin("Yimura's Mod Menu")) + if (g.window.main && ImGui::Begin("Yimura's Mod Menu", &g.window.main)) { ImGui::BeginTabBar("tabbar"); tab_main::tab_self(); diff --git a/BigBaseV2/src/gui/window/window_top_bar.cpp b/BigBaseV2/src/gui/window/window_top_bar.cpp index f4812381..0f86dcec 100644 --- a/BigBaseV2/src/gui/window/window_top_bar.cpp +++ b/BigBaseV2/src/gui/window/window_top_bar.cpp @@ -51,6 +51,13 @@ namespace big ImGui::EndMenu(); } + if (ImGui::BeginMenu("Windows")) + { + ImGui::MenuItem("Main Window", nullptr, &g.window.main); + + ImGui::EndMenu(); + } + if (ImGui::BeginMenu("Quit")) { if (ImGui::MenuItem("Unload Menu (may crash)"))