InputText: fix Space key with nav enabled interfering with input text boxes (fix bd6c9e99). made it possible to activate InputText with tweak gamepad button (why not, now that we can cancel) (#4552, #2321)

This commit is contained in:
ocornut
2021-09-17 15:44:43 +02:00
parent 3973de7933
commit 2cffcbdc64
4 changed files with 13 additions and 7 deletions

View File

@ -5118,7 +5118,7 @@ void ImGui::EndChild()
ItemAdd(bb, window->ChildId);
RenderNavHighlight(bb, window->ChildId);
// When browsing a window that has no activable items (scroll only) we keep a highlight on the child
// When browsing a window that has no activable items (scroll only) we keep a highlight on the child (pass g.NavId to trick into always displaying)
if (window->DC.NavLayersActiveMask == 0 && window == g.NavWindow)
RenderNavHighlight(ImRect(bb.Min - ImVec2(2, 2), bb.Max + ImVec2(2, 2)), g.NavId, ImGuiNavHighlightFlags_TypeThin);
}