Pārlūkot izejas kodu

Nav: fixed scroll fallback (when there are no interactive widgets to jump to) not being enabled on windows with menu or title bar.

ocornut 3 mēneši atpakaļ
vecāks
revīzija
19289d587a
2 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 2 0
      docs/CHANGELOG.txt
  2. 1 1
      imgui.cpp

+ 2 - 0
docs/CHANGELOG.txt

@@ -111,6 +111,8 @@ Other changes:
 - Clipper: some mitigation/improvements for abnormally large contents ranges. (#3609, #8215)
 - Nav: fixed assertion when holding gamepad FaceLeft/West button to open
   CTRL+Tab windowing + pressing a keyboard key. (#8525)
+- Nav: fixed scroll fallback (when there are no interactive widgets to jump to) not
+  being enabled on windows with menu or title bar.
 - Error Handling: added better error report and recovery for extraneous
   EndPopup() call. (#1651, #8499)
 - Error Handling: added better error report and recovery when calling EndFrame()

+ 1 - 1
imgui.cpp

@@ -13598,7 +13598,7 @@ static float ImGui::NavUpdatePageUpPageDown()
     if (g.NavLayer != ImGuiNavLayer_Main)
         NavRestoreLayer(ImGuiNavLayer_Main);
 
-    if (window->DC.NavLayersActiveMask == 0x00 && window->DC.NavWindowHasScrollY)
+    if ((window->DC.NavLayersActiveMask & (1 << ImGuiNavLayer_Main)) == 0 && window->DC.NavWindowHasScrollY)
     {
         // Fallback manual-scroll when window has no navigable item
         if (IsKeyPressed(ImGuiKey_PageUp, ImGuiInputFlags_Repeat, ImGuiKeyOwner_NoOwner))