|
@@ -1599,7 +1599,7 @@ struct ImGuiNavItemData
|
|
float DistBox; // Move // Best candidate box distance to current NavId
|
|
float DistBox; // Move // Best candidate box distance to current NavId
|
|
float DistCenter; // Move // Best candidate center distance to current NavId
|
|
float DistCenter; // Move // Best candidate center distance to current NavId
|
|
float DistAxial; // Move // Best candidate axial distance to current NavId
|
|
float DistAxial; // Move // Best candidate axial distance to current NavId
|
|
- ImGuiSelectionUserData SelectionUserData;//I+Mov // Best candidate SetNextItemSelectionData() value.
|
|
|
|
|
|
+ ImGuiSelectionUserData SelectionUserData;//I+Mov // Best candidate SetNextItemSelectionUserData() value. Valid if (InFlags & ImGuiItemFlags_HasSelectionUserData)
|
|
|
|
|
|
ImGuiNavItemData() { Clear(); }
|
|
ImGuiNavItemData() { Clear(); }
|
|
void Clear() { Window = NULL; ID = FocusScopeId = 0; InFlags = 0; SelectionUserData = -1; DistBox = DistCenter = DistAxial = FLT_MAX; }
|
|
void Clear() { Window = NULL; ID = FocusScopeId = 0; InFlags = 0; SelectionUserData = -1; DistBox = DistCenter = DistAxial = FLT_MAX; }
|
|
@@ -2044,6 +2044,7 @@ struct ImGuiContext
|
|
ImGuiWindow* NavWindow; // Focused window for navigation. Could be called 'FocusedWindow'
|
|
ImGuiWindow* NavWindow; // Focused window for navigation. Could be called 'FocusedWindow'
|
|
ImGuiID NavId; // Focused item for navigation
|
|
ImGuiID NavId; // Focused item for navigation
|
|
ImGuiID NavFocusScopeId; // Focused focus scope (e.g. selection code often wants to "clear other items" when landing on an item of the same scope)
|
|
ImGuiID NavFocusScopeId; // Focused focus scope (e.g. selection code often wants to "clear other items" when landing on an item of the same scope)
|
|
|
|
+ ImGuiNavLayer NavLayer; // Focused layer (main scrolling layer, or menu/title bar layer)
|
|
ImGuiID NavActivateId; // ~~ (g.ActiveId == 0) && (IsKeyPressed(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || IsKeyPressed(ImGuiKey_NavGamepadActivate)) ? NavId : 0, also set when calling ActivateItem()
|
|
ImGuiID NavActivateId; // ~~ (g.ActiveId == 0) && (IsKeyPressed(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || IsKeyPressed(ImGuiKey_NavGamepadActivate)) ? NavId : 0, also set when calling ActivateItem()
|
|
ImGuiID NavActivateDownId; // ~~ IsKeyDown(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || IsKeyDown(ImGuiKey_NavGamepadActivate) ? NavId : 0
|
|
ImGuiID NavActivateDownId; // ~~ IsKeyDown(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || IsKeyDown(ImGuiKey_NavGamepadActivate) ? NavId : 0
|
|
ImGuiID NavActivatePressedId; // ~~ IsKeyPressed(ImGuiKey_Space) || IsKeyPressed(ImGuiKey_Enter) || IsKeyPressed(ImGuiKey_NavGamepadActivate) ? NavId : 0 (no repeat)
|
|
ImGuiID NavActivatePressedId; // ~~ IsKeyPressed(ImGuiKey_Space) || IsKeyPressed(ImGuiKey_Enter) || IsKeyPressed(ImGuiKey_NavGamepadActivate) ? NavId : 0 (no repeat)
|
|
@@ -2051,13 +2052,9 @@ struct ImGuiContext
|
|
ImVector<ImGuiFocusScopeData> NavFocusRoute; // Reversed copy focus scope stack for NavId (should contains NavFocusScopeId). This essentially follow the window->ParentWindowForFocusRoute chain.
|
|
ImVector<ImGuiFocusScopeData> NavFocusRoute; // Reversed copy focus scope stack for NavId (should contains NavFocusScopeId). This essentially follow the window->ParentWindowForFocusRoute chain.
|
|
ImGuiID NavHighlightActivatedId;
|
|
ImGuiID NavHighlightActivatedId;
|
|
float NavHighlightActivatedTimer;
|
|
float NavHighlightActivatedTimer;
|
|
- ImGuiID NavJustMovedToId; // Just navigated to this id (result of a successfully MoveRequest).
|
|
|
|
- ImGuiID NavJustMovedToFocusScopeId; // Just navigated to this focus scope id (result of a successfully MoveRequest).
|
|
|
|
- ImGuiKeyChord NavJustMovedToKeyMods;
|
|
|
|
ImGuiID NavNextActivateId; // Set by ActivateItem(), queued until next frame.
|
|
ImGuiID NavNextActivateId; // Set by ActivateItem(), queued until next frame.
|
|
ImGuiActivateFlags NavNextActivateFlags;
|
|
ImGuiActivateFlags NavNextActivateFlags;
|
|
ImGuiInputSource NavInputSource; // Keyboard or Gamepad mode? THIS CAN ONLY BE ImGuiInputSource_Keyboard or ImGuiInputSource_Mouse
|
|
ImGuiInputSource NavInputSource; // Keyboard or Gamepad mode? THIS CAN ONLY BE ImGuiInputSource_Keyboard or ImGuiInputSource_Mouse
|
|
- ImGuiNavLayer NavLayer; // Layer we are navigating on. For now the system is hard-coded for 0=main contents and 1=menu/title bar, may expose layers later.
|
|
|
|
ImGuiSelectionUserData NavLastValidSelectionUserData; // Last valid data passed to SetNextItemSelectionUser(), or -1. For current window. Not reset when focusing an item that doesn't have selection data.
|
|
ImGuiSelectionUserData NavLastValidSelectionUserData; // Last valid data passed to SetNextItemSelectionUser(), or -1. For current window. Not reset when focusing an item that doesn't have selection data.
|
|
bool NavIdIsAlive; // Nav widget has been seen this frame ~~ NavRectRel is valid
|
|
bool NavIdIsAlive; // Nav widget has been seen this frame ~~ NavRectRel is valid
|
|
bool NavMousePosDirty; // When set we will update mouse position if (io.ConfigFlags & ImGuiConfigFlags_NavEnableSetMousePos) if set (NB: this not enabled by default)
|
|
bool NavMousePosDirty; // When set we will update mouse position if (io.ConfigFlags & ImGuiConfigFlags_NavEnableSetMousePos) if set (NB: this not enabled by default)
|
|
@@ -2088,6 +2085,14 @@ struct ImGuiContext
|
|
ImGuiNavItemData NavMoveResultOther; // Best move request candidate within NavWindow's flattened hierarchy (when using ImGuiWindowFlags_NavFlattened flag)
|
|
ImGuiNavItemData NavMoveResultOther; // Best move request candidate within NavWindow's flattened hierarchy (when using ImGuiWindowFlags_NavFlattened flag)
|
|
ImGuiNavItemData NavTabbingResultFirst; // First tabbing request candidate within NavWindow and flattened hierarchy
|
|
ImGuiNavItemData NavTabbingResultFirst; // First tabbing request candidate within NavWindow and flattened hierarchy
|
|
|
|
|
|
|
|
+ // Navigation: record of last move request
|
|
|
|
+ ImGuiID NavJustMovedFromFocusScopeId; // Just navigated from this focus scope id (result of a successfully MoveRequest).
|
|
|
|
+ ImGuiID NavJustMovedToId; // Just navigated to this id (result of a successfully MoveRequest).
|
|
|
|
+ ImGuiID NavJustMovedToFocusScopeId; // Just navigated to this focus scope id (result of a successfully MoveRequest).
|
|
|
|
+ ImGuiKeyChord NavJustMovedToKeyMods;
|
|
|
|
+ bool NavJustMovedToIsTabbing; // Copy of ImGuiNavMoveFlags_IsTabbing. Maybe we should store whole flags.
|
|
|
|
+ bool NavJustMovedToHasSelectionData; // Copy of move result's InFlags & ImGuiItemFlags_HasSelectionUserData). Maybe we should just store ImGuiNavItemData.
|
|
|
|
+
|
|
// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize)
|
|
// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize)
|
|
ImGuiKeyChord ConfigNavWindowingKeyNext; // = ImGuiMod_Ctrl | ImGuiKey_Tab (or ImGuiMod_Super | ImGuiKey_Tab on OS X). For reconfiguration (see #4828)
|
|
ImGuiKeyChord ConfigNavWindowingKeyNext; // = ImGuiMod_Ctrl | ImGuiKey_Tab (or ImGuiMod_Super | ImGuiKey_Tab on OS X). For reconfiguration (see #4828)
|
|
ImGuiKeyChord ConfigNavWindowingKeyPrev; // = ImGuiMod_Ctrl | ImGuiMod_Shift | ImGuiKey_Tab (or ImGuiMod_Super | ImGuiMod_Shift | ImGuiKey_Tab on OS X)
|
|
ImGuiKeyChord ConfigNavWindowingKeyPrev; // = ImGuiMod_Ctrl | ImGuiMod_Shift | ImGuiKey_Tab (or ImGuiMod_Super | ImGuiMod_Shift | ImGuiKey_Tab on OS X)
|
|
@@ -2324,18 +2329,18 @@ struct ImGuiContext
|
|
|
|
|
|
NavWindow = NULL;
|
|
NavWindow = NULL;
|
|
NavId = NavFocusScopeId = NavActivateId = NavActivateDownId = NavActivatePressedId = 0;
|
|
NavId = NavFocusScopeId = NavActivateId = NavActivateDownId = NavActivatePressedId = 0;
|
|
- NavJustMovedToId = NavJustMovedToFocusScopeId = NavNextActivateId = 0;
|
|
|
|
|
|
+ NavLayer = ImGuiNavLayer_Main;
|
|
|
|
+ NavNextActivateId = 0;
|
|
NavActivateFlags = NavNextActivateFlags = ImGuiActivateFlags_None;
|
|
NavActivateFlags = NavNextActivateFlags = ImGuiActivateFlags_None;
|
|
NavHighlightActivatedId = 0;
|
|
NavHighlightActivatedId = 0;
|
|
NavHighlightActivatedTimer = 0.0f;
|
|
NavHighlightActivatedTimer = 0.0f;
|
|
- NavJustMovedToKeyMods = ImGuiMod_None;
|
|
|
|
NavInputSource = ImGuiInputSource_Keyboard;
|
|
NavInputSource = ImGuiInputSource_Keyboard;
|
|
- NavLayer = ImGuiNavLayer_Main;
|
|
|
|
NavLastValidSelectionUserData = ImGuiSelectionUserData_Invalid;
|
|
NavLastValidSelectionUserData = ImGuiSelectionUserData_Invalid;
|
|
NavIdIsAlive = false;
|
|
NavIdIsAlive = false;
|
|
NavMousePosDirty = false;
|
|
NavMousePosDirty = false;
|
|
NavDisableHighlight = true;
|
|
NavDisableHighlight = true;
|
|
NavDisableMouseHover = false;
|
|
NavDisableMouseHover = false;
|
|
|
|
+
|
|
NavAnyRequest = false;
|
|
NavAnyRequest = false;
|
|
NavInitRequest = false;
|
|
NavInitRequest = false;
|
|
NavInitRequestFromMove = false;
|
|
NavInitRequestFromMove = false;
|
|
@@ -2350,6 +2355,11 @@ struct ImGuiContext
|
|
NavTabbingDir = 0;
|
|
NavTabbingDir = 0;
|
|
NavTabbingCounter = 0;
|
|
NavTabbingCounter = 0;
|
|
|
|
|
|
|
|
+ NavJustMovedFromFocusScopeId = NavJustMovedToId = NavJustMovedToFocusScopeId = 0;
|
|
|
|
+ NavJustMovedToKeyMods = ImGuiMod_None;
|
|
|
|
+ NavJustMovedToIsTabbing = false;
|
|
|
|
+ NavJustMovedToHasSelectionData = false;
|
|
|
|
+
|
|
// All platforms use Ctrl+Tab but Ctrl<>Super are swapped on Mac...
|
|
// All platforms use Ctrl+Tab but Ctrl<>Super are swapped on Mac...
|
|
// FIXME: Because this value is stored, it annoyingly interfere with toggling io.ConfigMacOSXBehaviors updating this..
|
|
// FIXME: Because this value is stored, it annoyingly interfere with toggling io.ConfigMacOSXBehaviors updating this..
|
|
ConfigNavWindowingKeyNext = IO.ConfigMacOSXBehaviors ? (ImGuiMod_Super | ImGuiKey_Tab) : (ImGuiMod_Ctrl | ImGuiKey_Tab);
|
|
ConfigNavWindowingKeyNext = IO.ConfigMacOSXBehaviors ? (ImGuiMod_Super | ImGuiKey_Tab) : (ImGuiMod_Ctrl | ImGuiKey_Tab);
|