From 20ade88fd98bb685c3b62d31b7582a01ae72e0f1 Mon Sep 17 00:00:00 2001 From: antopilo Date: Sun, 8 Sep 2024 12:32:05 -0400 Subject: [PATCH] Added a cancel button in new project wizard --- Editor/src/Windows/NewProjectWindow.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Editor/src/Windows/NewProjectWindow.cpp b/Editor/src/Windows/NewProjectWindow.cpp index ecee4b06..4b7b07ce 100644 --- a/Editor/src/Windows/NewProjectWindow.cpp +++ b/Editor/src/Windows/NewProjectWindow.cpp @@ -194,7 +194,12 @@ namespace Nuake ImGui::Dummy({ 1, ImGui::GetContentRegionAvail().y - 42 }); - ImGui::Dummy({ ImGui::GetContentRegionAvail().x - 130, 38 }); ImGui::SameLine(); + ImGui::Dummy({ ImGui::GetContentRegionAvail().x - 230 - 16, 38}); ImGui::SameLine(); + if (Nuake::UI::SecondaryButton("Cancel", { 100, 38 })) + { + m_Editor->isCreatingNewProject = false; + } + ImGui::SameLine(); if (Nuake::UI::PrimaryButton((ICON_FA_PLUS + std::string(" Create")).c_str(), Nuake::Vector2{ 120, 38 }, Nuake::Color(primaryColor.x, primaryColor.y, primaryColor.z, primaryColor.w))) { if (projectTitle.empty()) @@ -264,7 +269,6 @@ namespace Nuake void NewProjectWindow::DrawProjectTemplate(uint32_t i, const std::string& title, const std::string& description) { opened = true; - ImGui::ShowDemoWindow(&opened); ImGui::Dummy({ 4, 4 }); ImGui::SameLine(); opened = true;