mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-09 23:54:20 +00:00
Internals: rename ImGuiNextWindowData::Flags to HasFlags for consistency and to reduce mistakes.
This commit is contained in:
parent
4982602f6f
commit
e5668b8c73
4 changed files with 39 additions and 36 deletions
|
|
@ -1201,7 +1201,9 @@ enum ImGuiNextWindowDataFlags_
|
|||
// Storage for SetNexWindow** functions
|
||||
struct ImGuiNextWindowData
|
||||
{
|
||||
ImGuiNextWindowDataFlags Flags;
|
||||
ImGuiNextWindowDataFlags HasFlags;
|
||||
|
||||
// Members below are NOT cleared. Always rely on HasFlags.
|
||||
ImGuiCond PosCond;
|
||||
ImGuiCond SizeCond;
|
||||
ImGuiCond CollapsedCond;
|
||||
|
|
@ -1220,7 +1222,7 @@ struct ImGuiNextWindowData
|
|||
ImGuiWindowRefreshFlags RefreshFlagsVal;
|
||||
|
||||
ImGuiNextWindowData() { memset(this, 0, sizeof(*this)); }
|
||||
inline void ClearFlags() { Flags = ImGuiNextWindowDataFlags_None; }
|
||||
inline void ClearFlags() { HasFlags = ImGuiNextWindowDataFlags_None; }
|
||||
};
|
||||
|
||||
enum ImGuiNextItemDataFlags_
|
||||
|
|
@ -1237,7 +1239,8 @@ struct ImGuiNextItemData
|
|||
{
|
||||
ImGuiNextItemDataFlags HasFlags; // Called HasFlags instead of Flags to avoid mistaking this
|
||||
ImGuiItemFlags ItemFlags; // Currently only tested/used for ImGuiItemFlags_AllowOverlap and ImGuiItemFlags_HasSelectionUserData.
|
||||
// Non-flags members are NOT cleared by ItemAdd() meaning they are still valid during NavProcessItem()
|
||||
|
||||
// Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). Always rely on HasFlags.
|
||||
ImGuiID FocusScopeId; // Set by SetNextItemSelectionUserData()
|
||||
ImGuiSelectionUserData SelectionUserData; // Set by SetNextItemSelectionUserData() (note that NULL/0 is a valid value, we use -1 == ImGuiSelectionUserData_Invalid to mark invalid values)
|
||||
float Width; // Set by SetNextItemWidth()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue