|
@@ -9477,7 +9477,12 @@ static int CalcRoutingScore(ImGuiID focus_scope_id, ImGuiID owner_id, ImGuiInput
|
|
return 0;
|
|
return 0;
|
|
for (int index_in_focus_path = 0; index_in_focus_path < g.NavFocusRoute.Size; index_in_focus_path++)
|
|
for (int index_in_focus_path = 0; index_in_focus_path < g.NavFocusRoute.Size; index_in_focus_path++)
|
|
if (g.NavFocusRoute.Data[index_in_focus_path].ID == focus_scope_id)
|
|
if (g.NavFocusRoute.Data[index_in_focus_path].ID == focus_scope_id)
|
|
- return 199 - index_in_focus_path;
|
|
|
|
|
|
+ {
|
|
|
|
+ if (flags & ImGuiInputFlags_RouteOverActive) // && g.ActiveId != 0 && g.ActiveId != owner_id)
|
|
|
|
+ return 599 - index_in_focus_path;
|
|
|
|
+ else
|
|
|
|
+ return 199 - index_in_focus_path;
|
|
|
|
+ }
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
else if (flags & ImGuiInputFlags_RouteActive)
|
|
else if (flags & ImGuiInputFlags_RouteActive)
|
|
@@ -9534,8 +9539,10 @@ bool ImGui::SetShortcutRouting(ImGuiKeyChord key_chord, ImGuiInputFlags flags, I
|
|
else
|
|
else
|
|
IM_ASSERT(ImIsPowerOfTwo(flags & ImGuiInputFlags_RouteTypeMask_)); // Check that only 1 routing flag is used
|
|
IM_ASSERT(ImIsPowerOfTwo(flags & ImGuiInputFlags_RouteTypeMask_)); // Check that only 1 routing flag is used
|
|
IM_ASSERT(owner_id != ImGuiKeyOwner_Any && owner_id != ImGuiKeyOwner_NoOwner);
|
|
IM_ASSERT(owner_id != ImGuiKeyOwner_Any && owner_id != ImGuiKeyOwner_NoOwner);
|
|
- if (flags & (ImGuiInputFlags_RouteOverFocused | ImGuiInputFlags_RouteOverActive | ImGuiInputFlags_RouteUnlessBgFocused))
|
|
|
|
|
|
+ if (flags & (ImGuiInputFlags_RouteOverFocused | ImGuiInputFlags_RouteUnlessBgFocused))
|
|
IM_ASSERT(flags & ImGuiInputFlags_RouteGlobal);
|
|
IM_ASSERT(flags & ImGuiInputFlags_RouteGlobal);
|
|
|
|
+ if (flags & ImGuiInputFlags_RouteOverActive)
|
|
|
|
+ IM_ASSERT(flags & (ImGuiInputFlags_RouteGlobal | ImGuiInputFlags_RouteFocused));
|
|
|
|
|
|
// Add ImGuiMod_XXXX when a corresponding ImGuiKey_LeftXXX/ImGuiKey_RightXXX is specified.
|
|
// Add ImGuiMod_XXXX when a corresponding ImGuiKey_LeftXXX/ImGuiKey_RightXXX is specified.
|
|
key_chord = FixupKeyChord(key_chord);
|
|
key_chord = FixupKeyChord(key_chord);
|