|
@@ -5874,7 +5874,7 @@ static bool ImGui::UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& s
|
|
if (resize_rect.Min.x > resize_rect.Max.x) ImSwap(resize_rect.Min.x, resize_rect.Max.x);
|
|
if (resize_rect.Min.x > resize_rect.Max.x) ImSwap(resize_rect.Min.x, resize_rect.Max.x);
|
|
if (resize_rect.Min.y > resize_rect.Max.y) ImSwap(resize_rect.Min.y, resize_rect.Max.y);
|
|
if (resize_rect.Min.y > resize_rect.Max.y) ImSwap(resize_rect.Min.y, resize_rect.Max.y);
|
|
ImGuiID resize_grip_id = window->GetID(resize_grip_n); // == GetWindowResizeCornerID()
|
|
ImGuiID resize_grip_id = window->GetID(resize_grip_n); // == GetWindowResizeCornerID()
|
|
- KeepAliveID(resize_grip_id);
|
|
|
|
|
|
+ ItemAdd(resize_rect, resize_grip_id, NULL, ImGuiItemFlags_NoNav);
|
|
ButtonBehavior(resize_rect, resize_grip_id, &hovered, &held, ImGuiButtonFlags_FlattenChildren | ImGuiButtonFlags_NoNavFocus);
|
|
ButtonBehavior(resize_rect, resize_grip_id, &hovered, &held, ImGuiButtonFlags_FlattenChildren | ImGuiButtonFlags_NoNavFocus);
|
|
//GetForegroundDrawList(window)->AddRect(resize_rect.Min, resize_rect.Max, IM_COL32(255, 255, 0, 255));
|
|
//GetForegroundDrawList(window)->AddRect(resize_rect.Min, resize_rect.Max, IM_COL32(255, 255, 0, 255));
|
|
if (hovered || held)
|
|
if (hovered || held)
|
|
@@ -5910,7 +5910,7 @@ static bool ImGui::UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& s
|
|
bool hovered, held;
|
|
bool hovered, held;
|
|
ImRect border_rect = GetResizeBorderRect(window, border_n, grip_hover_inner_size, WINDOWS_HOVER_PADDING);
|
|
ImRect border_rect = GetResizeBorderRect(window, border_n, grip_hover_inner_size, WINDOWS_HOVER_PADDING);
|
|
ImGuiID border_id = window->GetID(border_n + 4); // == GetWindowResizeBorderID()
|
|
ImGuiID border_id = window->GetID(border_n + 4); // == GetWindowResizeBorderID()
|
|
- KeepAliveID(border_id);
|
|
|
|
|
|
+ ItemAdd(border_rect, border_id, NULL, ImGuiItemFlags_NoNav);
|
|
ButtonBehavior(border_rect, border_id, &hovered, &held, ImGuiButtonFlags_FlattenChildren | ImGuiButtonFlags_NoNavFocus);
|
|
ButtonBehavior(border_rect, border_id, &hovered, &held, ImGuiButtonFlags_FlattenChildren | ImGuiButtonFlags_NoNavFocus);
|
|
//GetForegroundDrawLists(window)->AddRect(border_rect.Min, border_rect.Max, IM_COL32(255, 255, 0, 255));
|
|
//GetForegroundDrawLists(window)->AddRect(border_rect.Min, border_rect.Max, IM_COL32(255, 255, 0, 255));
|
|
if ((hovered && g.HoveredIdTimer > WINDOWS_RESIZE_FROM_EDGES_FEEDBACK_TIMER) || held)
|
|
if ((hovered && g.HoveredIdTimer > WINDOWS_RESIZE_FROM_EDGES_FEEDBACK_TIMER) || held)
|
|
@@ -8650,11 +8650,14 @@ bool ImGui::ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb_arg, ImGu
|
|
// to reach unclipped widgets. This would work if user had explicit scrolling control (e.g. mapped on a stick).
|
|
// to reach unclipped widgets. This would work if user had explicit scrolling control (e.g. mapped on a stick).
|
|
// We intentionally don't check if g.NavWindow != NULL because g.NavAnyRequest should only be set when it is non null.
|
|
// We intentionally don't check if g.NavWindow != NULL because g.NavAnyRequest should only be set when it is non null.
|
|
// If we crash on a NULL g.NavWindow we need to fix the bug elsewhere.
|
|
// If we crash on a NULL g.NavWindow we need to fix the bug elsewhere.
|
|
- window->DC.NavLayersActiveMaskNext |= (1 << window->DC.NavLayerCurrent);
|
|
|
|
- if (g.NavId == id || g.NavAnyRequest)
|
|
|
|
- if (g.NavWindow->RootWindowForNav == window->RootWindowForNav)
|
|
|
|
- if (window == g.NavWindow || ((window->Flags | g.NavWindow->Flags) & ImGuiWindowFlags_NavFlattened))
|
|
|
|
- NavProcessItem();
|
|
|
|
|
|
+ if (!(g.LastItemData.InFlags & ImGuiItemFlags_NoNav))
|
|
|
|
+ {
|
|
|
|
+ window->DC.NavLayersActiveMaskNext |= (1 << window->DC.NavLayerCurrent);
|
|
|
|
+ if (g.NavId == id || g.NavAnyRequest)
|
|
|
|
+ if (g.NavWindow->RootWindowForNav == window->RootWindowForNav)
|
|
|
|
+ if (window == g.NavWindow || ((window->Flags | g.NavWindow->Flags) & ImGuiWindowFlags_NavFlattened))
|
|
|
|
+ NavProcessItem();
|
|
|
|
+ }
|
|
|
|
|
|
// [DEBUG] People keep stumbling on this problem and using "" as identifier in the root of a window instead of "##something".
|
|
// [DEBUG] People keep stumbling on this problem and using "" as identifier in the root of a window instead of "##something".
|
|
// Empty identifier are valid and useful in a small amount of cases, but 99.9% of the time you want to use "##something".
|
|
// Empty identifier are valid and useful in a small amount of cases, but 99.9% of the time you want to use "##something".
|
|
@@ -10172,7 +10175,7 @@ static void ImGui::NavProcessItem()
|
|
if (is_tab_stop || (g.NavMoveFlags & ImGuiNavMoveFlags_FocusApi))
|
|
if (is_tab_stop || (g.NavMoveFlags & ImGuiNavMoveFlags_FocusApi))
|
|
NavProcessItemForTabbingRequest(id);
|
|
NavProcessItemForTabbingRequest(id);
|
|
}
|
|
}
|
|
- else if ((g.NavId != id || (g.NavMoveFlags & ImGuiNavMoveFlags_AllowCurrentNavId)) && !(item_flags & (ImGuiItemFlags_Disabled | ImGuiItemFlags_NoNav)))
|
|
|
|
|
|
+ else if ((g.NavId != id || (g.NavMoveFlags & ImGuiNavMoveFlags_AllowCurrentNavId)) && !(item_flags & ImGuiItemFlags_Disabled))
|
|
{
|
|
{
|
|
ImGuiNavItemData* result = (window == g.NavWindow) ? &g.NavMoveResultLocal : &g.NavMoveResultOther;
|
|
ImGuiNavItemData* result = (window == g.NavWindow) ? &g.NavMoveResultLocal : &g.NavMoveResultOther;
|
|
if (!is_tabbing)
|
|
if (!is_tabbing)
|