You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it turns out, functions like IsItemHovered() won't work on an open BeginMenu() because LastItemData is overriden by BeginPopup(). Probably an easy fix.
IM_ASSERT((flags & (ImGuiHoveredFlags_AnyWindow | ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows | ImGuiHoveredFlags_NoPopupHierarchy)) == 0); // Flags not supported by this function
3586
3586
3587
+
// Done with rectangle culling so we can perform heavier checks now
3587
3588
// Test if we are hovering the right window (our window could be behind another window)
3588
3589
// [2021/03/02] Reworked / reverted the revert, finally. Note we want e.g. BeginGroup/ItemAdd/EndGroup to work as well. (#3851)
3589
3590
// [2017/10/16] Reverted commit 344d48be3 and testing RootWindow instead. I believe it is correct to NOT test for RootWindow but this leaves us unable
// Transient per-window flags, reset at the beginning of the frame. For child window, inherited from parent on first Begin().
761
+
// Flags used by upcoming items
762
+
// - input: PushItemFlag() manipulates g.CurrentItemFlags, ItemAdd() calls may add extra flags.
763
+
// - output: stored in g.LastItemData.InFlags
764
+
// Current window shared by all windows.
762
765
// This is going to be exposed in imgui.h when stabilized enough.
763
766
enum ImGuiItemFlags_
764
767
{
@@ -774,10 +777,11 @@ enum ImGuiItemFlags_
774
777
ImGuiItemFlags_ReadOnly = 1 << 7, // false // [ALPHA] Allow hovering interactions but underlying value is not changed.
775
778
776
779
// Controlled by widget code
777
-
ImGuiItemFlags_Inputable = 1 << 8, // false // [WIP] Auto-activate input mode when tab focused. Currently only used and supported by a few items before it becomes a generic feature.
780
+
ImGuiItemFlags_Inputable = 1 << 10,// false // [WIP] Auto-activate input mode when tab focused. Currently only used and supported by a few items before it becomes a generic feature.
778
781
};
779
782
780
-
// Storage for LastItem data
783
+
// Status flags for an already submitted item
784
+
// - output: stored in g.LastItemData.StatusFlags
781
785
enum ImGuiItemStatusFlags_
782
786
{
783
787
ImGuiItemStatusFlags_None = 0,
@@ -2650,7 +2654,7 @@ namespace ImGui
2650
2654
IMGUI_API ImVec2 GetContentRegionMaxAbs();
2651
2655
IMGUI_API voidShrinkWidths(ImGuiShrinkWidthItem* items, int count, float width_excess);
SetNextWindowPos(popup_pos, ImGuiCond_Always); // Note: this is super misleading! The value will serve as reference for FindBestWindowPosForPopup(), not actual pos.
7160
+
// FIXME: This technically breaks functions relying on LastItemData, somehow nobody complained yet. Should backup/restore LastItemData.
7161
+
SetNextWindowPos(popup_pos, ImGuiCond_Always); // Note: misleading: the value will serve as reference for FindBestWindowPosForPopup(), not actual pos.
7160
7162
PushStyleVar(ImGuiStyleVar_ChildRounding, style.PopupRounding); // First level will use _PopupRounding, subsequent will use _ChildRounding
7161
-
menu_is_open = BeginPopupEx(id, flags); // menu_is_open can be 'false' when the popup is completely clipped (e.g. zero size display)
7163
+
menu_is_open = BeginPopupEx(id, flags); // menu_is_open can be 'false' when the popup is completely clipped (e.g. zero size display)
0 commit comments