Skip to content

Commit cecd225

Browse files
committed
[UPD] : update for last ImGui 1.83/1.84WIP
1 parent d86a172 commit cecd225

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
{
@@ -623,7 +623,7 @@ namespace IGFD
623623
{
624624
if (!g.NavDisableMouseHover && g.NavWindow == window && g.NavLayer == window->DC.NavLayerCurrent)
625625
{
626-
//SetNavID(id, window->DC.NavLayerCurrent, window->DC.NavFocusScopeIdCurrent, ImRect(bb.Min - window->Pos, bb.Max - window->Pos));
626+
SetNavID(id, window->DC.NavLayerCurrent, window->DC.NavFocusScopeIdCurrent, ImRect(bb.Min - window->Pos, bb.Max - window->Pos));
627627
g.NavDisableHighlight = true;
628628
}
629629
}
@@ -657,7 +657,7 @@ 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

663663
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.ItemFlags);

0 commit comments

Comments
 (0)