Skip to content

Commit 1ccdfae

Browse files
committed
update for ImGui 1.82
1 parent d8a273d commit 1ccdfae

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

ImGuiFileDialog.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ namespace IGFD
538538
ItemSize(size, 0.0f);
539539

540540
// Fill horizontal space
541-
// We don't support (size < 0.0f) in Selectable() because the ItemSpacing extension would make explicitely right-aligned sizes not visibly match other widgets.
541+
// We don't support (size < 0.0f) in Selectable() because the ItemSpacing extension would make explicitly right-aligned sizes not visibly match other widgets.
542542
const bool span_all_columns = (flags & ImGuiSelectableFlags_SpanAllColumns) != 0;
543543
const float min_x = span_all_columns ? window->ParentWorkRect.Min.x : pos.x;
544544
const float max_x = span_all_columns ? window->ParentWorkRect.Max.x : window->WorkRect.Max.x;
@@ -576,10 +576,10 @@ namespace IGFD
576576
bool item_add;
577577
if (flags & ImGuiSelectableFlags_Disabled)
578578
{
579-
ImGuiItemFlags backup_item_flags = g.CurrentItemFlags;
580-
g.CurrentItemFlags |= ImGuiItemFlags_Disabled | ImGuiItemFlags_NoNavDefaultFocus;
579+
ImGuiItemFlags backup_item_flags = window->DC.ItemFlags;
580+
window->DC.ItemFlags |= ImGuiItemFlags_Disabled | ImGuiItemFlags_NoNavDefaultFocus;
581581
item_add = ItemAdd(bb, id);
582-
g.CurrentItemFlags = backup_item_flags;
582+
window->DC.ItemFlags = backup_item_flags;
583583
}
584584
else
585585
{
@@ -638,7 +638,7 @@ namespace IGFD
638638
window->DC.LastItemStatusFlags |= ImGuiItemStatusFlags_ToggledSelection;
639639

640640
// Render
641-
if ((held && (flags & ImGuiSelectableFlags_DrawHoveredWhenHeld)) || vFlashing)
641+
if (held && (flags & ImGuiSelectableFlags_DrawHoveredWhenHeld) || vFlashing)
642642
hovered = true;
643643
if (hovered || selected)
644644
{
@@ -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) && !(g.CurrentItemFlags & ImGuiItemFlags_SelectableDontClosePopup))
660+
if (pressed && (window->Flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiSelectableFlags_DontClosePopups) && !(window->DC.ItemFlags & ImGuiItemFlags_SelectableDontClosePopup))
661661
CloseCurrentPopup();
662662

663663
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.ItemFlags);
@@ -1449,7 +1449,7 @@ namespace IGFD
14491449

14501450
if (m_InputPathActivated)
14511451
{
1452-
auto gio = ImGui::GetIO();
1452+
ImGuiIO gio = ImGui::GetIO();
14531453
if (ImGui::IsKeyReleased(gio.KeyMap[ImGuiKey_Enter]))
14541454
{
14551455
SetPath(std::string(InputPathBuffer));

0 commit comments

Comments
 (0)