diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-09-27 18:38:35 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-09-27 18:38:35 +0200 |
| commit | d8c4d84dc75300c6d4d8b0adceafa33741960b92 (patch) | |
| tree | 00e2dfcc5c836d62fccff76c862e6ec3b0a74db8 /src/ui/imgui_extensions.cpp | |
| parent | fa088bb60692ba02d30d39affa9a31d9e2b688e2 (diff) | |
added http lib, working on AI invoice importing
Diffstat (limited to 'src/ui/imgui_extensions.cpp')
| -rw-r--r-- | src/ui/imgui_extensions.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
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) |
