From f3401ce1532938fec63d22095ca8b14affcfdce3 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Tue, 5 Mar 2024 19:16:25 +0100 Subject: exit button working --- src/main.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index e5b4fd3..eb9cee4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -39,7 +39,7 @@ static void _ts_create_popups() { // Settings window if (ImGui::BeginPopupModal("Text-Search settings", NULL, ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoMove)) { ImGui::SetWindowSize({300, 0}); - ImGui::DragInt("Threads", &ts_thread_count, 1.0f, 1, 4); + ImGui::DragInt("Threads", &ts_thread_count, 0.1f, 1, 8); ImGui::SetItemTooltip("Number of threads used to search for text matches"); ImGui::DragInt("File Size", &max_file_size, 50.0f, 1, 10000, "%dMB"); @@ -96,10 +96,12 @@ static int _ts_create_menu() { { if (ImGui::BeginMenu("File")) { - ImGui::MenuItem("Open", "CTRL+O"); - ImGui::MenuItem("Save", "CTRL+S"); + //ImGui::MenuItem("Open", "CTRL+O"); + //ImGui::MenuItem("Save", "CTRL+S"); ImGui::Separator(); - ImGui::MenuItem("Exit", "CTRL+Q"); + if (ImGui::MenuItem("Exit")) { + program_running = false; + } ImGui::EndMenu(); } if (ImGui::BeginMenu("Program")) -- cgit v1.2.3-70-g09d2