mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-15 00:44:20 +00:00
TreeNode: Added IsItemToggledOpen() to explicitly query if item was just open/closed, facilitating interactions with custom multi-selections patterns. (#1896, #1861)
This commit is contained in:
parent
011d475532
commit
57dc34f4e8
6 changed files with 21 additions and 7 deletions
|
|
@ -4458,6 +4458,12 @@ bool ImGui::IsItemClicked(int mouse_button)
|
|||
return IsMouseClicked(mouse_button) && IsItemHovered(ImGuiHoveredFlags_None);
|
||||
}
|
||||
|
||||
bool ImGui::IsItemToggledOpen()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
return (g.CurrentWindow->DC.LastItemStatusFlags & ImGuiItemStatusFlags_ToggledOpen) ? true : false;
|
||||
}
|
||||
|
||||
bool ImGui::IsItemToggledSelection()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue