Skip to content

Commit

Permalink
Windows: BeginChild(), Tables:fixed visibility of fully clipped child…
Browse files Browse the repository at this point in the history
… windows and tables to Test Engine.
  • Loading branch information
ocornut committed May 21, 2024
1 parent aa5a609 commit 28a283b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Other changes:
- Inputs: (OSX) Ctrl+Left Click alias as a Right click. (#2343) [@haldean, @ocornut]
- Inputs: Fixed ImGui::GetKeyName(ImGuiKey_None) from returning "N/A" or "None" depending
on value of IMGUI_DISABLE_OBSOLETE_KEYIO. It always returns "None".
- Windows: BeginChild(): fixed visibility of fully clipped child windows and tables to Test Engine.
- Nav: fixed holding Ctrl or gamepad L1 from not slowing down keyboard/gamepad tweak speed.
Broken during a refactor refactor for 1.89. Holding Shift/R1 to speed up wasn't broken.
- Tables: fixed cell background of fully clipped row overlapping with header. (#7575, #7041) [@prabuinet]
Expand Down
4 changes: 3 additions & 1 deletion imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5612,7 +5612,9 @@ void ImGui::EndChild()
else
{
// Not navigable into
ItemAdd(bb, 0);
// - This is a bit of a fringe use case, mostly useful for undecorated, non-scrolling contents childs, or empty childs.
// - We could later decide to not apply this path if ImGuiChildFlags_FrameStyle or ImGuiChildFlags_Borders is set.
ItemAdd(bb, child_window->ChildId, NULL, ImGuiItemFlags_NoNav);

// But when flattened we directly reach items, adjust active layer mask accordingly
if (child_window->Flags & ImGuiWindowFlags_NavFlattened)
Expand Down
2 changes: 1 addition & 1 deletion imgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
// Library Version
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
#define IMGUI_VERSION "1.90.7 WIP"
#define IMGUI_VERSION_NUM 19064
#define IMGUI_VERSION_NUM 19065
#define IMGUI_HAS_TABLE

/*
Expand Down
2 changes: 2 additions & 0 deletions imgui_tables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ bool ImGui::BeginTableEx(const char* name, ImGuiID id, int columns_count, ImG
if (use_child_window && IsClippedEx(outer_rect, 0) && !outer_window_is_measuring_size)
{
ItemSize(outer_rect);
ItemAdd(outer_rect, id);
return false;
}

Expand Down Expand Up @@ -1462,6 +1463,7 @@ void ImGui::EndTable()
// CursorPosPrevLine and CursorMaxPos manually. That should be a more general layout feature, see same problem e.g. #3414)
if (inner_window != outer_window)
{
inner_window->DC.NavLayersActiveMask |= 1 << ImGuiNavLayer_Main; // So empty table don't appear to navigate differently.
EndChild();
}
else
Expand Down

0 comments on commit 28a283b

Please sign in to comment.