mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-27 16:29:02 +08:00
Nav: Renaming a field + Comments.
This commit is contained in:
parent
db5f1b79cd
commit
d761825cfb
@ -1970,7 +1970,7 @@ void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window)
|
||||
if (id)
|
||||
{
|
||||
g.ActiveIdIsAlive = true;
|
||||
g.ActiveIdSource = (g.NavActivateId == id || g.NavInputId == id || g.NavJustTabbedId == id || g.NavJustNavigatedId == id) ? ImGuiInputSource_Nav : ImGuiInputSource_Mouse;
|
||||
g.ActiveIdSource = (g.NavActivateId == id || g.NavInputId == id || g.NavJustTabbedId == id || g.NavJustMovedToId == id) ? ImGuiInputSource_Nav : ImGuiInputSource_Mouse;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2748,7 +2748,7 @@ static void NavUpdate()
|
||||
g.NavInitRequest = false;
|
||||
g.NavInitResultExplicit = false;
|
||||
g.NavInitResultId = 0;
|
||||
g.NavJustNavigatedId = 0;
|
||||
g.NavJustMovedToId = 0;
|
||||
|
||||
// Process navigation move request
|
||||
if (g.NavMoveRequest && g.NavMoveResultId != 0)
|
||||
@ -2761,7 +2761,7 @@ static void NavUpdate()
|
||||
// Apply result from previous frame navigation directional move request
|
||||
ImGui::ClearActiveID();
|
||||
SetNavIDAndMoveMouse(g.NavMoveResultId, g.NavLayer, g.NavMoveResultRectRel);
|
||||
g.NavJustNavigatedId = g.NavMoveResultId;
|
||||
g.NavJustMovedToId = g.NavMoveResultId;
|
||||
g.NavMoveFromClampedRefRect = false;
|
||||
}
|
||||
|
||||
|
4
imgui.h
4
imgui.h
@ -902,8 +902,8 @@ struct ImGuiIO
|
||||
bool WantCaptureKeyboard; // Widget is active (= ImGui will use your keyboard input). Use to hide keyboard from the rest of your application
|
||||
bool WantTextInput; // Some text input widget is active, which will read input characters from the InputCharacters array. Use to activate on screen keyboard if your system needs one
|
||||
bool WantMoveMouse; // MousePos has been altered. back-end should reposition mouse on next frame. used only if 'NavMovesMouse=true'.
|
||||
bool NavUsable; // Directional navigation is currently allowed (ImGuiKey_NavXXX events).
|
||||
bool NavActive; // Directional navigation is active/visible and currently allowed (ImGuiKey_NavXXX events).
|
||||
bool NavUsable; // Directional navigation is currently allowed (will handle ImGuiKey_NavXXX events).
|
||||
bool NavActive; // Directional navigation is active/visible and currently allowed (will handle ImGuiKey_NavXXX events).
|
||||
float Framerate; // Application framerate estimation, in frame per second. Solely for convenience. Rolling average estimation based on IO.DeltaTime over 120 frames
|
||||
int MetricsAllocs; // Number of active memory allocations
|
||||
int MetricsRenderVertices; // Vertices output during last call to Render()
|
||||
|
@ -463,13 +463,14 @@ struct ImGuiContext
|
||||
ImVector<ImGuiPopupRef> CurrentPopupStack; // Which level of BeginPopup() we are in (reset every frame)
|
||||
|
||||
// Navigation data (for gamepad/keyboard)
|
||||
ImGuiWindow* NavWindow; // Nav/focused window for navigation
|
||||
ImGuiID NavId; // Nav/focused item for navigation
|
||||
ImGuiID NavActivateId, NavActivateDownId; // ~~ IsNavInputPressed(ImGuiNavInput_PadActivate) ? NavId : 0, etc.
|
||||
ImGuiID NavInputId; // ~~ IsNavInputPressed(ImGuiNavInput_PadInput) ? NavId : 0, etc.
|
||||
ImGuiWindow* NavWindow; // Focused window for navigation
|
||||
ImGuiID NavId; // Focused item for navigation
|
||||
ImGuiID NavActivateId; // ~~ IsNavInputPressed(ImGuiNavInput_PadActivate) ? NavId : 0, also set when calling ActivateItem()
|
||||
ImGuiID NavActivateDownId; // ~~ IsNavInputPressed(ImGuiNavInput_PadActivate) ? NavId : 0
|
||||
ImGuiID NavInputId; // ~~ IsNavInputPressed(ImGuiNavInput_PadInput) ? NavId : 0
|
||||
ImGuiID NavJustTabbedId; // Just tabbed to this id.
|
||||
ImGuiID NavJustNavigatedId; // Just navigated to this id (result of a successfully MoveRequest)
|
||||
ImGuiID NavNextActivateId; // Set by ActivateItem(), queued until next frame
|
||||
ImGuiID NavJustMovedToId; // Just navigated to this id (result of a successfully MoveRequest)
|
||||
ImRect NavScoringRectScreen; // Rectangle used for scoring, in screen space. Based of window->DC.NavRefRectRel[], modified for directional navigation scoring.
|
||||
ImGuiWindow* NavWindowingTarget;
|
||||
float NavWindowingDisplayAlpha;
|
||||
@ -586,7 +587,7 @@ struct ImGuiContext
|
||||
|
||||
NavWindow = NULL;
|
||||
NavId = NavActivateId = NavActivateDownId = NavInputId = 0;
|
||||
NavJustTabbedId = NavJustNavigatedId = NavNextActivateId = 0;
|
||||
NavJustTabbedId = NavJustMovedToId = NavNextActivateId = 0;
|
||||
NavScoringRectScreen = ImRect();
|
||||
NavWindowingTarget = NULL;
|
||||
NavWindowingDisplayAlpha = 0.0f;
|
||||
|
Loading…
Reference in New Issue
Block a user