mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-07 09:53:50 +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";
|
char vehicle_gun_model[12] = "bus";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct window {
|
||||||
|
bool main = true;
|
||||||
|
};
|
||||||
|
|
||||||
self self{};
|
self self{};
|
||||||
vehicle vehicle{};
|
vehicle vehicle{};
|
||||||
weapons weapons{};
|
weapons weapons{};
|
||||||
|
window window{};
|
||||||
|
|
||||||
void from_json(const nlohmann::json& j)
|
void from_json(const nlohmann::json& j)
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@ namespace big
|
|||||||
void window::main()
|
void window::main()
|
||||||
{
|
{
|
||||||
ImGui::SetNextWindowSize({ 800, 840 }, ImGuiCond_FirstUseEver);
|
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");
|
ImGui::BeginTabBar("tabbar");
|
||||||
tab_main::tab_self();
|
tab_main::tab_self();
|
||||||
|
@ -51,6 +51,13 @@ namespace big
|
|||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ImGui::BeginMenu("Windows"))
|
||||||
|
{
|
||||||
|
ImGui::MenuItem("Main Window", nullptr, &g.window.main);
|
||||||
|
|
||||||
|
ImGui::EndMenu();
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui::BeginMenu("Quit"))
|
if (ImGui::BeginMenu("Quit"))
|
||||||
{
|
{
|
||||||
if (ImGui::MenuItem("Unload Menu (may crash)"))
|
if (ImGui::MenuItem("Unload Menu (may crash)"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user