From d8c4d84dc75300c6d4d8b0adceafa33741960b92 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sat, 27 Sep 2025 18:38:35 +0200 Subject: added http lib, working on AI invoice importing --- src/ui/imgui_extensions.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/ui/imgui_extensions.cpp') diff --git a/src/ui/imgui_extensions.cpp b/src/ui/imgui_extensions.cpp index 4dc1fb9..4a0117b 100644 --- a/src/ui/imgui_extensions.cpp +++ b/src/ui/imgui_extensions.cpp @@ -43,20 +43,19 @@ namespace ImGui } } - bool FormFileSelector(char* buffer) + bool FormInvoiceFileSelector(char* text, char* buffer) { bool result = false; float widthAvailable = ImGui::GetContentRegionAvail().x; ImGui::SetNextItemWidth(widthAvailable*0.5f); - if (ImGui::Button("Select file...")) // @localize + if (ImGui::Button(text)) { - // You can adjust filters, title, default path - const char *filterPatterns[] = { "*.png", "*.jpg", "*.pdf", "*" }; + const char *filterPatterns[] = { "*.pdf" }; const char *file = tinyfd_openFileDialog( "Choose a file", // dialog title // @localize NULL, // default path - 4, // number of filter patterns + 1, // number of filter patterns filterPatterns, // filter patterns array NULL, // single filter description (can be NULL) 0); // allowMultiple (0 = single) -- cgit v1.2.3-70-g09d2