diff --git a/src/client/render/gui/MainMenu.cpp b/src/client/render/gui/MainMenu.cpp index aee3793..ed04ea7 100644 --- a/src/client/render/gui/MainMenu.cpp +++ b/src/client/render/gui/MainMenu.cpp @@ -66,6 +66,7 @@ void MainMenu::Render() { if (m_FileDialog.showFileDialog("WorldFileDialog", imgui_addons::ImGuiFileBrowser::DialogMode::OPEN, ImVec2(600, 300), ".tdmap")) { m_WorldFilePath = m_FileDialog.selected_path; } + if (m_Server != nullptr) ImGui::BeginDisabled(); if (ImGui::Button("Créer")) { if (!StartServer()) { m_TriedToCreate = true; @@ -73,6 +74,7 @@ void MainMenu::Render() { GetClient()->Connect(td::network::Dns::Resolve("localhost"), m_ServerPort); } } + else if (m_Server != nullptr) ImGui::EndDisabled(); if (m_TriedToCreate) ImGui::Text("Failed to launch server"); ImGui::EndPopup();