mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Reluctantly exposed GetActiveID(), GetHoveredID() in imgui_internal because the demo code will need it.
This commit is contained in:
12
imgui.cpp
12
imgui.cpp
@ -1974,6 +1974,12 @@ void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window)
|
||||
}
|
||||
}
|
||||
|
||||
ImGuiID ImGui::GetActiveID()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
return g.ActiveId;
|
||||
}
|
||||
|
||||
// Assume that SetFocusID() is called in the context where its NavLayer is the current window nav layer.
|
||||
void ImGui::SetFocusID(ImGuiID id, ImGuiWindow* window)
|
||||
{
|
||||
@ -2000,6 +2006,12 @@ void ImGui::SetHoveredID(ImGuiID id)
|
||||
g.HoveredIdAllowOverlap = false;
|
||||
}
|
||||
|
||||
ImGuiID ImGui::GetHoveredID()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
return g.HoveredId ? g.HoveredId : g.HoveredIdPreviousFrame;
|
||||
}
|
||||
|
||||
void ImGui::KeepAliveID(ImGuiID id)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
Reference in New Issue
Block a user