Moved KeepAliveID() as well for increased locality.
Adding dummy ItemAdd() placeholder to facilitate diffing (otherwise single commit single diff is a mess).
// Code not using ItemAdd() may need to call this manually otherwise ActiveId will be cleared. In IMGUI_VERSION_NUM < 18717 this was called by GetID().
voidImGui::KeepAliveID(ImGuiIDid)
{
ImGuiContext&g=*GImGui;
if(g.ActiveId==id)
g.ActiveIdIsAlive=id;
if(g.ActiveIdPreviousFrame==id)
g.ActiveIdPreviousFrameIsAlive=true;
}
voidImGui::MarkItemEdited(ImGuiIDid)
{
// This marking is solely to be able to provide info for IsItemDeactivatedAfterEdit().
// Code not using ItemAdd() may need to call this manually otherwise ActiveId will be cleared. In IMGUI_VERSION_NUM < 18717 this was called by GetID().
voidImGui::KeepAliveID(ImGuiIDid)
{
ImGuiContext&g=*GImGui;
if(g.ActiveId==id)
g.ActiveIdIsAlive=id;
if(g.ActiveIdPreviousFrame==id)
g.ActiveIdPreviousFrameIsAlive=true;
}
/*
// Declare item bounding box for clipping and interaction.
// Note that the size can be different than the one provided to ItemSize(). Typically, widgets that spread over available surface
// declare their minimum size requirement to ItemSize() and provide a larger region to ItemAdd() which is used drawing/interaction.
// THIS IS IN THE PERFORMANCE CRITICAL PATH (UNTIL THE CLIPPING TEST AND EARLY-RETURN)