mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-22 20:07:01 +00: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)
|
if (id)
|
||||||
{
|
{
|
||||||
g.ActiveIdIsAlive = true;
|
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.NavInitRequest = false;
|
||||||
g.NavInitResultExplicit = false;
|
g.NavInitResultExplicit = false;
|
||||||
g.NavInitResultId = 0;
|
g.NavInitResultId = 0;
|
||||||
g.NavJustNavigatedId = 0;
|
g.NavJustMovedToId = 0;
|
||||||
|
|
||||||
// Process navigation move request
|
// Process navigation move request
|
||||||
if (g.NavMoveRequest && g.NavMoveResultId != 0)
|
if (g.NavMoveRequest && g.NavMoveResultId != 0)
|
||||||
@ -2761,7 +2761,7 @@ static void NavUpdate()
|
|||||||
// Apply result from previous frame navigation directional move request
|
// Apply result from previous frame navigation directional move request
|
||||||
ImGui::ClearActiveID();
|
ImGui::ClearActiveID();
|
||||||
SetNavIDAndMoveMouse(g.NavMoveResultId, g.NavLayer, g.NavMoveResultRectRel);
|
SetNavIDAndMoveMouse(g.NavMoveResultId, g.NavLayer, g.NavMoveResultRectRel);
|
||||||
g.NavJustNavigatedId = g.NavMoveResultId;
|
g.NavJustMovedToId = g.NavMoveResultId;
|
||||||
g.NavMoveFromClampedRefRect = false;
|
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 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 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 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 NavUsable; // Directional navigation is currently allowed (will handle ImGuiKey_NavXXX events).
|
||||||
bool NavActive; // Directional navigation is active/visible and currently allowed (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
|
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 MetricsAllocs; // Number of active memory allocations
|
||||||
int MetricsRenderVertices; // Vertices output during last call to Render()
|
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)
|
ImVector<ImGuiPopupRef> CurrentPopupStack; // Which level of BeginPopup() we are in (reset every frame)
|
||||||
|
|
||||||
// Navigation data (for gamepad/keyboard)
|
// Navigation data (for gamepad/keyboard)
|
||||||
ImGuiWindow* NavWindow; // Nav/focused window for navigation
|
ImGuiWindow* NavWindow; // Focused window for navigation
|
||||||
ImGuiID NavId; // Nav/focused item for navigation
|
ImGuiID NavId; // Focused item for navigation
|
||||||
ImGuiID NavActivateId, NavActivateDownId; // ~~ IsNavInputPressed(ImGuiNavInput_PadActivate) ? NavId : 0, etc.
|
ImGuiID NavActivateId; // ~~ IsNavInputPressed(ImGuiNavInput_PadActivate) ? NavId : 0, also set when calling ActivateItem()
|
||||||
ImGuiID NavInputId; // ~~ IsNavInputPressed(ImGuiNavInput_PadInput) ? NavId : 0, etc.
|
ImGuiID NavActivateDownId; // ~~ IsNavInputPressed(ImGuiNavInput_PadActivate) ? NavId : 0
|
||||||
|
ImGuiID NavInputId; // ~~ IsNavInputPressed(ImGuiNavInput_PadInput) ? NavId : 0
|
||||||
ImGuiID NavJustTabbedId; // Just tabbed to this id.
|
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 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.
|
ImRect NavScoringRectScreen; // Rectangle used for scoring, in screen space. Based of window->DC.NavRefRectRel[], modified for directional navigation scoring.
|
||||||
ImGuiWindow* NavWindowingTarget;
|
ImGuiWindow* NavWindowingTarget;
|
||||||
float NavWindowingDisplayAlpha;
|
float NavWindowingDisplayAlpha;
|
||||||
@ -586,7 +587,7 @@ struct ImGuiContext
|
|||||||
|
|
||||||
NavWindow = NULL;
|
NavWindow = NULL;
|
||||||
NavId = NavActivateId = NavActivateDownId = NavInputId = 0;
|
NavId = NavActivateId = NavActivateDownId = NavInputId = 0;
|
||||||
NavJustTabbedId = NavJustNavigatedId = NavNextActivateId = 0;
|
NavJustTabbedId = NavJustMovedToId = NavNextActivateId = 0;
|
||||||
NavScoringRectScreen = ImRect();
|
NavScoringRectScreen = ImRect();
|
||||||
NavWindowingTarget = NULL;
|
NavWindowingTarget = NULL;
|
||||||
NavWindowingDisplayAlpha = 0.0f;
|
NavWindowingDisplayAlpha = 0.0f;
|
||||||
|
Loading…
Reference in New Issue
Block a user