Skip to content

Commit af3dc25

Browse files
committed
[FIX] fix issue directory chooser mode
[ADD] add infos for directory chooser, and detail view mode in readme.md
1 parent 407c9f1 commit af3dc25

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

ImGuiFileDialog/ImGuiFileDialog.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,16 +1271,19 @@ namespace igfd
12711271
bool found = false;
12721272
int itemIdx = 0;
12731273
const char* p = dlg_filters;
1274-
while (*p)
1274+
if (p)
12751275
{
1276-
if (m_SelectedExt == std::string(p))
1276+
while (*p)
12771277
{
1278-
found = true;
1279-
FilterIndex = itemIdx;
1280-
break;
1278+
if (m_SelectedExt == std::string(p))
1279+
{
1280+
found = true;
1281+
FilterIndex = itemIdx;
1282+
break;
1283+
}
1284+
p += strlen(p) + 1;
1285+
itemIdx++;
12811286
}
1282-
p += strlen(p) + 1;
1283-
itemIdx++;
12841287
}
12851288
if (!found)
12861289
{

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,16 @@ ImVec2 minSize = maxSize * 0.5f;
158158
igfd::ImGuiFileDialog::Instance()->FileDialog("ChooseFileDlgKey", ImGuiWindowFlags_NoCollapse, minSize, maxSize);
159159
```
160160

161-
![alt text](doc/contraintDisplay.gif)
161+
![alt text](doc/dialog_constraints.gif)
162+
163+
## Detail View Mode
164+
165+
You can have tables display like that.
166+
167+
- you need to use imgui tables branch (not merged in master at this moment)
168+
- uncomment "#define USE_IMGUI_TABLES" in you custom config file (CustomImGuiFileDialogConfig.h in this example)
169+
170+
![alt text](doc/imgui_tables_branch.gif)
162171

163172
## Using ImGuiFileDialog as a module
164173

doc/dialog_constraints.gif

535 KB
Loading

doc/imgui_tables_branch.gif

364 KB
Loading

0 commit comments

Comments
 (0)