Skip to content

Commit

Permalink
[FIX] fix issue directory chooser mode
Browse files Browse the repository at this point in the history
[ADD] add infos for directory chooser, and detail view mode in readme.md
  • Loading branch information
aiekick committed Jun 3, 2020
1 parent 407c9f1 commit af3dc25
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
17 changes: 10 additions & 7 deletions ImGuiFileDialog/ImGuiFileDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1271,16 +1271,19 @@ namespace igfd
bool found = false;
int itemIdx = 0;
const char* p = dlg_filters;
while (*p)
if (p)
{
if (m_SelectedExt == std::string(p))
while (*p)
{
found = true;
FilterIndex = itemIdx;
break;
if (m_SelectedExt == std::string(p))
{
found = true;
FilterIndex = itemIdx;
break;
}
p += strlen(p) + 1;
itemIdx++;
}
p += strlen(p) + 1;
itemIdx++;
}
if (!found)
{
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,16 @@ ImVec2 minSize = maxSize * 0.5f;
igfd::ImGuiFileDialog::Instance()->FileDialog("ChooseFileDlgKey", ImGuiWindowFlags_NoCollapse, minSize, maxSize);
```

![alt text](doc/contraintDisplay.gif)
![alt text](doc/dialog_constraints.gif)

## Detail View Mode

You can have tables display like that.

- you need to use imgui tables branch (not merged in master at this moment)
- uncomment "#define USE_IMGUI_TABLES" in you custom config file (CustomImGuiFileDialogConfig.h in this example)

![alt text](doc/imgui_tables_branch.gif)

## Using ImGuiFileDialog as a module

Expand Down
Binary file added doc/dialog_constraints.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/imgui_tables_branch.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit af3dc25

Please sign in to comment.