Auto collapse menu bar when connection established

This commit is contained in:
dijunkun
2024-05-28 17:37:06 +08:00
parent b4a5e91bc9
commit 93d0e3a5d0
2 changed files with 9 additions and 4 deletions

View File

@@ -623,9 +623,14 @@ int main(int argc, char *argv[]) {
#endif #endif
#if CHINESE_FONT #if CHINESE_FONT
ImGui::Begin(u8"菜单", nullptr, if (!joined) {
ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGui::Begin(u8"菜单", nullptr,
ImGuiWindowFlags_NoMove); ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse |
ImGuiWindowFlags_NoMove);
} else {
ImGui::SetNextWindowCollapsed(true, ImGuiCond_Once);
ImGui::Begin(u8"菜单", nullptr, ImGuiWindowFlags_None);
}
#else #else
ImGui::Begin("Menu", nullptr, ImGuiWindowFlags_NoResize); ImGui::Begin("Menu", nullptr, ImGuiWindowFlags_NoResize);
#endif #endif