@@ -6068,7 +6068,7 @@ bool ImGui::BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, I
6068
6068
// A SetNextWindowSize() call always has priority (#8020)
6069
6069
// (since the code in Begin() never supported SizeVal==0.0f aka auto-resize via SetNextWindowSize() call, we don't support it here for now)
6070
6070
// FIXME: We only support ImGuiCond_Always in this path. Supporting other paths would requires to obtain window pointer.
6071
- if ((g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasSize) != 0 && (g.NextWindowData.SizeCond & ImGuiCond_Always) != 0)
6071
+ if ((g.NextWindowData.HasFlags & ImGuiNextWindowDataFlags_HasSize) != 0 && (g.NextWindowData.SizeCond & ImGuiCond_Always) != 0)
6072
6072
{
6073
6073
if (g.NextWindowData.SizeVal.x > 0.0f)
6074
6074
{
@@ -6084,11 +6084,11 @@ bool ImGui::BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, I
6084
6084
SetNextWindowSize(size);
6085
6085
6086
6086
// Forward child flags (we allow prior settings to merge but it'll only work for adding flags)
6087
- if (g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasChildFlags)
6087
+ if (g.NextWindowData.HasFlags & ImGuiNextWindowDataFlags_HasChildFlags)
6088
6088
g.NextWindowData.ChildFlags |= child_flags;
6089
6089
else
6090
6090
g.NextWindowData.ChildFlags = child_flags;
6091
- g.NextWindowData.Flags |= ImGuiNextWindowDataFlags_HasChildFlags;
6091
+ g.NextWindowData.HasFlags |= ImGuiNextWindowDataFlags_HasChildFlags;
6092
6092
6093
6093
// Build up name. If you need to append to a same child from multiple location in the ID stack, use BeginChild(ImGuiID id) with a stable value.
6094
6094
// FIXME: 2023/11/14: commented out shorted version. We had an issue with multiple ### in child window path names, which the trailing hash helped workaround.
@@ -6302,7 +6302,7 @@ static ImVec2 CalcWindowSizeAfterConstraint(ImGuiWindow* window, const ImVec2& s
6302
6302
{
6303
6303
ImGuiContext& g = *GImGui;
6304
6304
ImVec2 new_size = size_desired;
6305
- if (g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasSizeConstraint)
6305
+ if (g.NextWindowData.HasFlags & ImGuiNextWindowDataFlags_HasSizeConstraint)
6306
6306
{
6307
6307
// See comments in SetNextWindowSizeConstraints() for details about setting size_min an size_max.
6308
6308
ImRect cr = g.NextWindowData.SizeConstraintRect;
@@ -6780,7 +6780,7 @@ void ImGui::RenderWindowDecorations(ImGuiWindow* window, const ImRect& title_bar
6780
6780
ImU32 bg_col = GetColorU32(GetWindowBgColorIdx(window));
6781
6781
bool override_alpha = false;
6782
6782
float alpha = 1.0f;
6783
- if (g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasBgAlpha)
6783
+ if (g.NextWindowData.HasFlags & ImGuiNextWindowDataFlags_HasBgAlpha)
6784
6784
{
6785
6785
alpha = g.NextWindowData.BgAlphaVal;
6786
6786
override_alpha = true;
@@ -6950,7 +6950,7 @@ void ImGui::UpdateWindowSkipRefresh(ImGuiWindow* window)
6950
6950
{
6951
6951
ImGuiContext& g = *GImGui;
6952
6952
window->SkipRefresh = false;
6953
- if ((g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasRefreshPolicy) == 0)
6953
+ if ((g.NextWindowData.HasFlags & ImGuiNextWindowDataFlags_HasRefreshPolicy) == 0)
6954
6954
return;
6955
6955
if (g.NextWindowData.RefreshFlagsVal & ImGuiWindowRefreshFlags_TryToAvoidRefresh)
6956
6956
{
@@ -7031,7 +7031,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
7031
7031
{
7032
7032
UpdateWindowInFocusOrderList(window, window_just_created, flags);
7033
7033
window->Flags = (ImGuiWindowFlags)flags;
7034
- window->ChildFlags = (g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasChildFlags) ? g.NextWindowData.ChildFlags : 0;
7034
+ window->ChildFlags = (g.NextWindowData.HasFlags & ImGuiNextWindowDataFlags_HasChildFlags) ? g.NextWindowData.ChildFlags : 0;
7035
7035
window->LastFrameActive = current_frame;
7036
7036
window->LastTimeActive = (float)g.Time;
7037
7037
window->BeginOrderWithinParent = 0;
@@ -7095,7 +7095,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
7095
7095
// (FIXME: Consider splitting the HasXXX flags into X/Y components
7096
7096
bool window_pos_set_by_api = false;
7097
7097
bool window_size_x_set_by_api = false, window_size_y_set_by_api = false;
7098
- if (g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasPos)
7098
+ if (g.NextWindowData.HasFlags & ImGuiNextWindowDataFlags_HasPos)
7099
7099
{
7100
7100
window_pos_set_by_api = (window->SetWindowPosAllowFlags & g.NextWindowData.PosCond) != 0;
7101
7101
if (window_pos_set_by_api && ImLengthSqr(g.NextWindowData.PosPivotVal) > 0.00001f)
@@ -7111,7 +7111,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
7111
7111
SetWindowPos(window, g.NextWindowData.PosVal, g.NextWindowData.PosCond);
7112
7112
}
7113
7113
}
7114
- if (g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasSize)
7114
+ if (g.NextWindowData.HasFlags & ImGuiNextWindowDataFlags_HasSize)
7115
7115
{
7116
7116
window_size_x_set_by_api = (window->SetWindowSizeAllowFlags & g.NextWindowData.SizeCond) != 0 && (g.NextWindowData.SizeVal.x > 0.0f);
7117
7117
window_size_y_set_by_api = (window->SetWindowSizeAllowFlags & g.NextWindowData.SizeCond) != 0 && (g.NextWindowData.SizeVal.y > 0.0f);
@@ -7121,7 +7121,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
7121
7121
g.NextWindowData.SizeVal.y = window->SizeFull.y;
7122
7122
SetWindowSize(window, g.NextWindowData.SizeVal, g.NextWindowData.SizeCond);
7123
7123
}
7124
- if (g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasScroll)
7124
+ if (g.NextWindowData.HasFlags & ImGuiNextWindowDataFlags_HasScroll)
7125
7125
{
7126
7126
if (g.NextWindowData.ScrollVal.x >= 0.0f)
7127
7127
{
@@ -7134,13 +7134,13 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
7134
7134
window->ScrollTargetCenterRatio.y = 0.0f;
7135
7135
}
7136
7136
}
7137
- if (g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasContentSize)
7137
+ if (g.NextWindowData.HasFlags & ImGuiNextWindowDataFlags_HasContentSize)
7138
7138
window->ContentSizeExplicit = g.NextWindowData.ContentSizeVal;
7139
7139
else if (first_begin_of_the_frame)
7140
7140
window->ContentSizeExplicit = ImVec2(0.0f, 0.0f);
7141
- if (g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasCollapsed)
7141
+ if (g.NextWindowData.HasFlags & ImGuiNextWindowDataFlags_HasCollapsed)
7142
7142
SetWindowCollapsed(window, g.NextWindowData.CollapsedVal, g.NextWindowData.CollapsedCond);
7143
- if (g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasFocus)
7143
+ if (g.NextWindowData.HasFlags & ImGuiNextWindowDataFlags_HasFocus)
7144
7144
FocusWindow(window);
7145
7145
if (window->Appearing)
7146
7146
SetWindowConditionAllowFlags(window, ImGuiCond_Appearing, false);
@@ -8223,7 +8223,7 @@ void ImGui::SetNextWindowPos(const ImVec2& pos, ImGuiCond cond, const ImVec2& pi
8223
8223
{
8224
8224
ImGuiContext& g = *GImGui;
8225
8225
IM_ASSERT(cond == 0 || ImIsPowerOfTwo(cond)); // Make sure the user doesn't attempt to combine multiple condition flags.
8226
- g.NextWindowData.Flags |= ImGuiNextWindowDataFlags_HasPos;
8226
+ g.NextWindowData.HasFlags |= ImGuiNextWindowDataFlags_HasPos;
8227
8227
g.NextWindowData.PosVal = pos;
8228
8228
g.NextWindowData.PosPivotVal = pivot;
8229
8229
g.NextWindowData.PosCond = cond ? cond : ImGuiCond_Always;
@@ -8233,7 +8233,7 @@ void ImGui::SetNextWindowSize(const ImVec2& size, ImGuiCond cond)
8233
8233
{
8234
8234
ImGuiContext& g = *GImGui;
8235
8235
IM_ASSERT(cond == 0 || ImIsPowerOfTwo(cond)); // Make sure the user doesn't attempt to combine multiple condition flags.
8236
- g.NextWindowData.Flags |= ImGuiNextWindowDataFlags_HasSize;
8236
+ g.NextWindowData.HasFlags |= ImGuiNextWindowDataFlags_HasSize;
8237
8237
g.NextWindowData.SizeVal = size;
8238
8238
g.NextWindowData.SizeCond = cond ? cond : ImGuiCond_Always;
8239
8239
}
@@ -8245,7 +8245,7 @@ void ImGui::SetNextWindowSize(const ImVec2& size, ImGuiCond cond)
8245
8245
void ImGui::SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeCallback custom_callback, void* custom_callback_user_data)
8246
8246
{
8247
8247
ImGuiContext& g = *GImGui;
8248
- g.NextWindowData.Flags |= ImGuiNextWindowDataFlags_HasSizeConstraint;
8248
+ g.NextWindowData.HasFlags |= ImGuiNextWindowDataFlags_HasSizeConstraint;
8249
8249
g.NextWindowData.SizeConstraintRect = ImRect(size_min, size_max);
8250
8250
g.NextWindowData.SizeCallback = custom_callback;
8251
8251
g.NextWindowData.SizeCallbackUserData = custom_callback_user_data;
@@ -8256,38 +8256,38 @@ void ImGui::SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& s
8256
8256
void ImGui::SetNextWindowContentSize(const ImVec2& size)
8257
8257
{
8258
8258
ImGuiContext& g = *GImGui;
8259
- g.NextWindowData.Flags |= ImGuiNextWindowDataFlags_HasContentSize;
8259
+ g.NextWindowData.HasFlags |= ImGuiNextWindowDataFlags_HasContentSize;
8260
8260
g.NextWindowData.ContentSizeVal = ImTrunc(size);
8261
8261
}
8262
8262
8263
8263
void ImGui::SetNextWindowScroll(const ImVec2& scroll)
8264
8264
{
8265
8265
ImGuiContext& g = *GImGui;
8266
- g.NextWindowData.Flags |= ImGuiNextWindowDataFlags_HasScroll;
8266
+ g.NextWindowData.HasFlags |= ImGuiNextWindowDataFlags_HasScroll;
8267
8267
g.NextWindowData.ScrollVal = scroll;
8268
8268
}
8269
8269
8270
8270
void ImGui::SetNextWindowCollapsed(bool collapsed, ImGuiCond cond)
8271
8271
{
8272
8272
ImGuiContext& g = *GImGui;
8273
8273
IM_ASSERT(cond == 0 || ImIsPowerOfTwo(cond)); // Make sure the user doesn't attempt to combine multiple condition flags.
8274
- g.NextWindowData.Flags |= ImGuiNextWindowDataFlags_HasCollapsed;
8274
+ g.NextWindowData.HasFlags |= ImGuiNextWindowDataFlags_HasCollapsed;
8275
8275
g.NextWindowData.CollapsedVal = collapsed;
8276
8276
g.NextWindowData.CollapsedCond = cond ? cond : ImGuiCond_Always;
8277
8277
}
8278
8278
8279
8279
void ImGui::SetNextWindowBgAlpha(float alpha)
8280
8280
{
8281
8281
ImGuiContext& g = *GImGui;
8282
- g.NextWindowData.Flags |= ImGuiNextWindowDataFlags_HasBgAlpha;
8282
+ g.NextWindowData.HasFlags |= ImGuiNextWindowDataFlags_HasBgAlpha;
8283
8283
g.NextWindowData.BgAlphaVal = alpha;
8284
8284
}
8285
8285
8286
8286
// This is experimental and meant to be a toy for exploring a future/wider range of features.
8287
8287
void ImGui::SetNextWindowRefreshPolicy(ImGuiWindowRefreshFlags flags)
8288
8288
{
8289
8289
ImGuiContext& g = *GImGui;
8290
- g.NextWindowData.Flags |= ImGuiNextWindowDataFlags_HasRefreshPolicy;
8290
+ g.NextWindowData.HasFlags |= ImGuiNextWindowDataFlags_HasRefreshPolicy;
8291
8291
g.NextWindowData.RefreshFlagsVal = flags;
8292
8292
}
8293
8293
@@ -11301,7 +11301,7 @@ bool ImGui::BeginTooltipEx(ImGuiTooltipFlags tooltip_flags, ImGuiWindowFlags ext
11301
11301
// See FindBestWindowPosForPopup() for positionning logic of other tooltips (not drag and drop ones).
11302
11302
//ImVec2 tooltip_pos = g.IO.MousePos - g.ActiveIdClickOffset - g.Style.WindowPadding;
11303
11303
const bool is_touchscreen = (g.IO.MouseSource == ImGuiMouseSource_TouchScreen);
11304
- if ((g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasPos) == 0)
11304
+ if ((g.NextWindowData.HasFlags & ImGuiNextWindowDataFlags_HasPos) == 0)
11305
11305
{
11306
11306
ImVec2 tooltip_pos = is_touchscreen ? (g.IO.MousePos + TOOLTIP_DEFAULT_OFFSET_TOUCH * g.Style.MouseCursorScale) : (g.IO.MousePos + TOOLTIP_DEFAULT_OFFSET_MOUSE * g.Style.MouseCursorScale);
11307
11307
ImVec2 tooltip_pivot = is_touchscreen ? TOOLTIP_DEFAULT_PIVOT_TOUCH : ImVec2(0.0f, 0.0f);
@@ -11724,7 +11724,7 @@ bool ImGui::BeginPopupModal(const char* name, bool* p_open, ImGuiWindowFlags fla
11724
11724
// Center modal windows by default for increased visibility
11725
11725
// (this won't really last as settings will kick in, and is mostly for backward compatibility. user may do the same themselves)
11726
11726
// FIXME: Should test for (PosCond & window->SetWindowPosAllowFlags) with the upcoming window.
11727
- if ((g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasPos) == 0)
11727
+ if ((g.NextWindowData.HasFlags & ImGuiNextWindowDataFlags_HasPos) == 0)
11728
11728
{
11729
11729
const ImGuiViewport* viewport = GetMainViewport();
11730
11730
SetNextWindowPos(viewport->GetCenter(), ImGuiCond_FirstUseEver, ImVec2(0.5f, 0.5f));
@@ -12017,7 +12017,7 @@ void ImGui::SetWindowFocus(const char* name)
12017
12017
void ImGui::SetNextWindowFocus()
12018
12018
{
12019
12019
ImGuiContext& g = *GImGui;
12020
- g.NextWindowData.Flags |= ImGuiNextWindowDataFlags_HasFocus;
12020
+ g.NextWindowData.HasFlags |= ImGuiNextWindowDataFlags_HasFocus;
12021
12021
}
12022
12022
12023
12023
// Similar to IsWindowHovered()
@@ -16548,7 +16548,7 @@ static void ShowDebugLogFlag(const char* name, ImGuiDebugLogFlags flags)
16548
16548
void ImGui::ShowDebugLogWindow(bool* p_open)
16549
16549
{
16550
16550
ImGuiContext& g = *GImGui;
16551
- if ((g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasSize) == 0)
16551
+ if ((g.NextWindowData.HasFlags & ImGuiNextWindowDataFlags_HasSize) == 0)
16552
16552
SetNextWindowSize(ImVec2(0.0f, GetFontSize() * 12.0f), ImGuiCond_FirstUseEver);
16553
16553
if (!Begin("Dear ImGui Debug Log", p_open) || GetCurrentWindow()->BeginCount > 1)
16554
16554
{
@@ -16868,7 +16868,7 @@ static int StackToolFormatLevelInfo(ImGuiIDStackTool* tool, int n, bool format_f
16868
16868
void ImGui::ShowIDStackToolWindow(bool* p_open)
16869
16869
{
16870
16870
ImGuiContext& g = *GImGui;
16871
- if ((g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasSize) == 0)
16871
+ if ((g.NextWindowData.HasFlags & ImGuiNextWindowDataFlags_HasSize) == 0)
16872
16872
SetNextWindowSize(ImVec2(0.0f, GetFontSize() * 8.0f), ImGuiCond_FirstUseEver);
16873
16873
if (!Begin("Dear ImGui ID Stack Tool", p_open) || GetCurrentWindow()->BeginCount > 1)
16874
16874
{
0 commit comments