mirror of
https://github.com/ocornut/imgui.git
synced 2025-12-17 11:55:35 +00:00
(Breaking) Commented out legacy SetItemAllowOverlap() obsoleted in 1.89.7: this never worked right. Use SetNextItemAllowOverlap() _before_ item instead.
This commit is contained in:
21
imgui.cpp
21
imgui.cpp
@@ -402,6 +402,7 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures:
|
||||
- ImGuiKey_ModAlt --> ImGuiMod_Alt
|
||||
- ImGuiKey_ModSuper --> ImGuiMod_Super
|
||||
- 2025/11/06 (1.92.5) - IO: commented out legacy io.ClearInputCharacters() obsoleted in 1.89.8 (Aug 2023). Calling io.ClearInputKeys() is enough.
|
||||
- 2025/11/06 (1.92.5) - Commented out legacy SetItemAllowOverlap() obsoleted in 1.89.7: this never worked right. Use SetNextItemAllowOverlap() _before_ item instead.
|
||||
- 2025/10/14 (1.92.4) - TreeNode, Selectable, Clipper: commented out legacy names which were obsoleted in 1.89.7 (July 2023) and 1.89.9 (Sept 2023);
|
||||
- ImGuiTreeNodeFlags_AllowItemOverlap --> ImGuiTreeNodeFlags_AllowOverlap
|
||||
- ImGuiSelectableFlags_AllowItemOverlap --> ImGuiSelectableFlags_AllowOverlap
|
||||
@@ -6227,16 +6228,16 @@ void ImGui::SetNextItemAllowOverlap()
|
||||
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
// Allow last item to be overlapped by a subsequent item. Both may be activated during the same frame before the later one takes priority.
|
||||
// FIXME-LEGACY: Use SetNextItemAllowOverlap() *before* your item instead.
|
||||
void ImGui::SetItemAllowOverlap()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiID id = g.LastItemData.ID;
|
||||
if (g.HoveredId == id)
|
||||
g.HoveredIdAllowOverlap = true;
|
||||
if (g.ActiveId == id) // Before we made this obsolete, most calls to SetItemAllowOverlap() used to avoid this path by testing g.ActiveId != id.
|
||||
g.ActiveIdAllowOverlap = true;
|
||||
}
|
||||
// Use SetNextItemAllowOverlap() *before* your item instead of calling this!
|
||||
//void ImGui::SetItemAllowOverlap()
|
||||
//{
|
||||
// ImGuiContext& g = *GImGui;
|
||||
// ImGuiID id = g.LastItemData.ID;
|
||||
// if (g.HoveredId == id)
|
||||
// g.HoveredIdAllowOverlap = true;
|
||||
// if (g.ActiveId == id) // Before we made this obsolete, most calls to SetItemAllowOverlap() used to avoid this path by testing g.ActiveId != id.
|
||||
// g.ActiveIdAllowOverlap = true;
|
||||
//}
|
||||
#endif
|
||||
|
||||
// This is a shortcut for not taking ownership of 100+ keys, frequently used by drag operations.
|
||||
|
||||
Reference in New Issue
Block a user