From c90f78df080a9891930ee346b0ad87498ba5b697 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sun, 30 May 2021 23:00:41 -0700 Subject: Initial work on templates UI --- core/src/UI/UI_MainWindow.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'core/src/UI/UI_MainWindow.cpp') diff --git a/core/src/UI/UI_MainWindow.cpp b/core/src/UI/UI_MainWindow.cpp index b1bee7d..1838aec 100644 --- a/core/src/UI/UI_MainWindow.cpp +++ b/core/src/UI/UI_MainWindow.cpp @@ -21,7 +21,7 @@ void ProjectTab_Normal() auto& gs = GlobalStates::GetInstance(); auto& uis = UIState::GetInstance(); - if (ImGui::Button(ls->CloseActiveProject.Get())) { + if (ImGui::Button(ls->Close.Get())) { uis.CloseCurrentProject(); return; } @@ -93,9 +93,9 @@ void ProjectTab_NoProject() uis.SetCurrentProject(std::make_unique(std::move(dirPath), std::move(projectName))); // Dialog just got closed, reset states - projectName = ""; - dirName = ""; - dirPath = fs::path{}; + projectName.clear(); + dirName.clear(); + dirPath.clear(); dirNameIsValid = false; } @@ -231,6 +231,11 @@ void UI::MainWindow() ImGui::EndTabItem(); } + if (ImGui::BeginTabItem(ls->TemplatesTab.Get())) { + UI::TemplatesTab(); + ImGui::EndTabItem(); + } + endTab: ImGui::EndTabBar(); } -- cgit v1.2.3-70-g09d2