MCPcopy Create free account
hub / github.com/clementgallet/libTAS / FocusItem

Method FocusItem

src/external/imgui/imgui.cpp:7796–7812  ·  view source on GitHub ↗

Focus = move navigation cursor, set scrolling, set focus window.

Source from the content-addressed store, hash-verified

7794
7795// Focus = move navigation cursor, set scrolling, set focus window.
7796void ImGui::FocusItem()
7797{
7798 ImGuiContext& g = *GImGui;
7799 ImGuiWindow* window = g.CurrentWindow;
7800 IMGUI_DEBUG_LOG_FOCUS("FocusItem(0x%08x) in window \"%s\"\n", g.LastItemData.ID, window->Name);
7801 if (g.DragDropActive || g.MovingWindow != NULL) // FIXME: Opt-in flags for this?
7802 {
7803 IMGUI_DEBUG_LOG_FOCUS("FocusItem() ignored while DragDropActive!\n");
7804 return;
7805 }
7806
7807 ImGuiNavMoveFlags move_flags = ImGuiNavMoveFlags_IsTabbing | ImGuiNavMoveFlags_FocusApi | ImGuiNavMoveFlags_NoSetNavHighlight | ImGuiNavMoveFlags_NoSelect;
7808 ImGuiScrollFlags scroll_flags = window->Appearing ? ImGuiScrollFlags_KeepVisibleEdgeX | ImGuiScrollFlags_AlwaysCenterY : ImGuiScrollFlags_KeepVisibleEdgeX | ImGuiScrollFlags_KeepVisibleEdgeY;
7809 SetNavWindow(window);
7810 NavMoveRequestSubmit(ImGuiDir_None, ImGuiDir_Up, move_flags, scroll_flags);
7811 NavMoveRequestResolveWithLastItem(&g.NavMoveResultLocal);
7812}
7813
7814void ImGui::ActivateItemByID(ImGuiID id)
7815{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected