Internals: widgets always read back from g.LastItemData.InFlags (so we can now modify per-item disable state more easily). (#211)

This commit is contained in:
ocornut
2021-07-19 21:17:34 +02:00
parent 6b8a059fc9
commit 90bf996e1a
3 changed files with 13 additions and 12 deletions

View File

@ -1176,8 +1176,8 @@ struct ImGuiNextItemData
struct ImGuiLastItemData
{
ImGuiID ID;
ImGuiItemFlags InFlags;
ImGuiItemStatusFlags StatusFlags;
ImGuiItemFlags InFlags; // See ImGuiItemFlags_
ImGuiItemStatusFlags StatusFlags; // See ImGuiItemStatusFlags_
ImRect Rect;
ImRect DisplayRect;
@ -1479,7 +1479,7 @@ struct ImGuiContext
float LastActiveIdTimer; // Store the last non-zero ActiveId timer since the beginning of activation, useful for animation.
// Next window/item data
ImGuiItemFlags CurrentItemFlags; // == g.ItemFlagsStack.back()
ImGuiItemFlags CurrentItemFlags; // == g.ItemFlagsStack.back()
ImGuiNextItemData NextItemData; // Storage for SetNextItem** functions
ImGuiLastItemData LastItemData; // Storage for last submitted item (setup by ItemAdd)
ImGuiNextWindowData NextWindowData; // Storage for SetNextWindow** functions