Skip to content

Commit

Permalink
[ADD] : add a use case for filter extention less files like MakeFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
aiekick committed Feb 1, 2024
1 parent 5679009 commit 8cd2a80
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,15 @@ int main(int, char**) {
config.flags = flags;
ImGuiFileDialog::Instance()->OpenDialog("ChooseFileDlgKey", ICON_IGFD_FOLDER_OPEN " Choose a File", filters, config);
}
if (ImGui::Button(ICON_IGFD_FOLDER_OPEN " Open File Dialog with filter of type regex (([a-zA-Z0-9]+)) for extention less files")) {
// the regex for being recognized at regex need to be between ( and )
const char* filters = "Regex ext less {(([a-zA-Z0-9]+))}";
IGFD::FileDialogConfig config;
config.path = ".";
config.countSelectionMax = 1;
config.flags = flags;
ImGuiFileDialog::Instance()->OpenDialog("ChooseFileDlgKey", ICON_IGFD_FOLDER_OPEN " Choose a File", filters, config);
}
if (ImGui::Button(ICON_IGFD_FOLDER_OPEN " Open File Dialog with selection of 5 items")) {
const char* filters = ".*,.cpp,.h,.hpp";
IGFD::FileDialogConfig config;
Expand Down

0 comments on commit 8cd2a80

Please sign in to comment.