mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-05 17:13:29 +08:00
feat(TopBar): Toggle main window
This commit is contained in:
parent
a69ea344dc
commit
7006e55558
@ -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)
|
||||
{
|
||||
|
@ -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();
|
||||
|
@ -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)"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user