Disabled: nested tooltips or other non-child window within a BeginDisabled() block disable the disabled state. (#211, #7640)

This commit is contained in:
ocornut
2024-05-31 18:13:25 +02:00
parent e47015aef4
commit f953ebf9ca
4 changed files with 44 additions and 3 deletions
+3
View File
@@ -2472,6 +2472,7 @@ struct IMGUI_API ImGuiWindowTempData
bool NavWindowHasScrollY; // Set per window when scrolling can be used (== ScrollMax.y > 0.0f)
// Miscellaneous
bool BackupItemDisabled; // Non-child window override disabled flag
bool MenuBarAppending; // FIXME: Remove this
ImVec2 MenuBarOffset; // MenuBarOffset.x is sort of equivalent of a per-layer CursorPos.x, saved/restored as we switch to the menu bar. The only situation when MenuBarOffset.y is > 0 if when (SafeAreaPadding.y > FramePadding.y), often used on TVs.
ImGuiMenuColumns MenuColumns; // Simplified columns storage for menu items measurement
@@ -3127,6 +3128,8 @@ namespace ImGui
IMGUI_API void PushItemFlag(ImGuiItemFlags option, bool enabled);
IMGUI_API void PopItemFlag();
IMGUI_API const ImGuiDataVarInfo* GetStyleVarInfo(ImGuiStyleVar idx);
IMGUI_API void BeginDisabledOverrideReenable();
IMGUI_API void EndDisabledOverrideReenable();
// Logging/Capture
IMGUI_API void LogBegin(ImGuiLogType type, int auto_open_depth); // -> BeginCapture() when we design v2 api, for now stay under the radar by using the old name.