mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-22 11:57:00 +00:00
Nav: Exposed NavInitWindow() in imgui_internal (#787)
This commit is contained in:
parent
f5c47faee8
commit
4e3c7f1557
@ -2528,7 +2528,7 @@ int ImGui::GetFrameCount()
|
||||
}
|
||||
|
||||
// This needs to be called before we submit any widget (aka in or before Begin)
|
||||
static void NavInitWindow(ImGuiWindow* window, bool force_reinit)
|
||||
void ImGui::NavInitWindow(ImGuiWindow* window, bool force_reinit)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
IM_ASSERT(window == g.NavWindow);
|
||||
@ -4724,7 +4724,7 @@ static bool BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, b
|
||||
if (/*!(flags & ImGuiWindowFlags_NavFlattened) &&*/ (child_window->DC.NavLayerActiveMask != 0 || child_window->DC.NavHasScroll) && g.NavActivateId == id)
|
||||
{
|
||||
ImGui::FocusWindow(child_window);
|
||||
NavInitWindow(child_window, false);
|
||||
ImGui::NavInitWindow(child_window, false);
|
||||
ImGui::SetActiveID(id+1, child_window); // Steal ActiveId with a dummy id so that key-press won't activate child item
|
||||
g.ActiveIdSource = ImGuiInputSource_Nav;
|
||||
}
|
||||
|
@ -914,6 +914,8 @@ namespace ImGui
|
||||
IMGUI_API bool BeginPopupEx(ImGuiID id, ImGuiWindowFlags extra_flags);
|
||||
IMGUI_API void BeginTooltipEx(ImGuiWindowFlags extra_flags, bool override_previous_tooltip = true);
|
||||
|
||||
IMGUI_API void NavInitWindow(ImGuiWindow* window, bool force_reinit);
|
||||
|
||||
IMGUI_API int CalcTypematicPressedRepeatAmount(float t, float t_prev, float repeat_delay, float repeat_rate);
|
||||
|
||||
IMGUI_API void Scrollbar(ImGuiLayoutType direction);
|
||||
|
Loading…
Reference in New Issue
Block a user