Skip to content

Commit a2c2ca2

Browse files
committed
update for ImGui 1.83
1 parent 1ccdfae commit a2c2ca2

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

ImGuiFileDialog.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -576,10 +576,10 @@ namespace IGFD
576576
bool item_add;
577577
if (flags & ImGuiSelectableFlags_Disabled)
578578
{
579-
ImGuiItemFlags backup_item_flags = window->DC.ItemFlags;
580-
window->DC.ItemFlags |= ImGuiItemFlags_Disabled | ImGuiItemFlags_NoNavDefaultFocus;
579+
ImGuiItemFlags backup_item_flags = g.CurrentItemFlags;
580+
g.CurrentItemFlags |= ImGuiItemFlags_Disabled | ImGuiItemFlags_NoNavDefaultFocus;
581581
item_add = ItemAdd(bb, id);
582-
window->DC.ItemFlags = backup_item_flags;
582+
g.CurrentItemFlags = backup_item_flags;
583583
}
584584
else
585585
{
@@ -657,10 +657,10 @@ namespace IGFD
657657
if (flags & ImGuiSelectableFlags_Disabled) PopStyleColor();
658658

659659
// Automatically close popups
660-
if (pressed && (window->Flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiSelectableFlags_DontClosePopups) && !(window->DC.ItemFlags & ImGuiItemFlags_SelectableDontClosePopup))
660+
if (pressed && (window->Flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiSelectableFlags_DontClosePopups) && !(g.CurrentItemFlags & ImGuiItemFlags_SelectableDontClosePopup))
661661
CloseCurrentPopup();
662662

663-
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.ItemFlags);
663+
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags);
664664
return pressed;
665665
}
666666
#endif // USE_EXPLORATION_BY_KEYS

0 commit comments

Comments
 (0)