Skip to content

Commit 7713c29

Browse files
committed
BeginChild: Upgraded 'bool border = true' parameter to use a ImGuiChildFlags type and the ImGuiChildFlags_Border value. (toward ocornut#1666, ocornut#1496, ocornut#1395, ocornut#1710)
1 parent 88fec09 commit 7713c29

File tree

6 files changed

+60
-31
lines changed

6 files changed

+60
-31
lines changed

docs/CHANGELOG.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ HOW TO UPDATE?
4242

4343
Breaking changes:
4444

45+
- BeginChild(): Upgraded 'bool border = false' parameter to 'ImGuiChildFlags flags'.
46+
Added ImGuiChildFlags_Border value. As with our prior "bool-to-flags" API updates,
47+
the ImGuiChildFlags_Border value is guaranteed to be == true forever to ensure a
48+
smoother transition, meaning all existing calls will still work.
49+
If you want to neatly transition your call sites:
50+
Before: BeginChild("Name", size, true)
51+
After: BeginChild("Name", size, ImGuiChildFlags_Border)
52+
Before: BeginChild("Name", size, false)
53+
After: BeginChild("Name", size) or BeginChild("Name", 0) or BeginChild("Name", size, ImGuiChildFlags_None)
54+
Kept inline redirection function with strongly typed bool versions (will obsolete).
4555
- Debug Tools: Renamed ShowStackToolWindow() ("Stack Tool") to ShowIDStackToolWindow() ("ID Stack Tool"),
4656
as earlier name was misleading. Kept inline redirection function. (#4631)
4757
- IO: Removed io.MetricsActiveAllocations introduced in 1.63, was displayed in Metrics and unlikely to
@@ -68,6 +78,7 @@ Breaking changes:
6878
Other changes:
6979

7080
- Windows:
81+
- BeginChild(): Added ImGuiChildFlags_Border as a replacement for 'bool border = true' parameter.
7182
- BeginChild(): Internal name used by child windows now omits the hash/id if the child
7283
window is submitted in root of id stack of parent window. Makes debugging/metrics easier
7384
and shorter to read in many cases.

imgui.cpp

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,11 @@ CODE
424424
When you are not sure about an old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all imgui files.
425425
You can read releases logs https://github.com/ocornut/imgui/releases for more details.
426426

427+
- 2023/11/02 (1.90.0) - BeginChild: upgraded 'bool border = true' parameter to 'ImGuiChildFlags flags' type, added ImGuiChildFlags_Border equivalent. As with our prior "bool-to-flags" API updates, the ImGuiChildFlags_Border value is guaranteed to be == true forever to ensure a smoother transition, meaning all existing calls will still work.
428+
- old: BeginChild("Name", size, true)
429+
- new: BeginChild("Name", size, ImGuiChildFlags_Border)
430+
- old: BeginChild("Name", size, false)
431+
- new: BeginChild("Name", size) or BeginChild("Name", 0) or BeginChild("Name", size, ImGuiChildFlags_None)
427432
- 2023/09/27 (1.90.0) - io: removed io.MetricsActiveAllocations introduced in 1.63. Same as 'g.DebugMemAllocCount - g.DebugMemFreeCount' (still displayed in Metrics, unlikely to be accessed by end-user).
428433
- 2023/09/26 (1.90.0) - debug tools: Renamed ShowStackToolWindow() ("Stack Tool") to ShowIDStackToolWindow() ("ID Stack Tool"), as earlier name was misleading. Kept inline redirection function. (#4631)
429434
- 2023/09/15 (1.90.0) - ListBox, Combo: changed signature of "name getter" callback in old one-liner ListBox()/Combo() apis. kept inline redirection function (will obsolete).
@@ -5414,22 +5419,23 @@ ImVec2 ImGui::GetItemRectSize()
54145419
return g.LastItemData.Rect.GetSize();
54155420
}
54165421

5417-
bool ImGui::BeginChild(const char* str_id, const ImVec2& size_arg, bool border, ImGuiWindowFlags window_flags)
5422+
bool ImGui::BeginChild(const char* str_id, const ImVec2& size_arg, ImGuiChildFlags child_flags, ImGuiWindowFlags window_flags)
54185423
{
54195424
ImGuiID id = GetCurrentWindow()->GetID(str_id);
5420-
return BeginChildEx(str_id, id, size_arg, border, window_flags);
5425+
return BeginChildEx(str_id, id, size_arg, child_flags, window_flags);
54215426
}
54225427

5423-
bool ImGui::BeginChild(ImGuiID id, const ImVec2& size_arg, bool border, ImGuiWindowFlags window_flags)
5428+
bool ImGui::BeginChild(ImGuiID id, const ImVec2& size_arg, ImGuiChildFlags child_flags, ImGuiWindowFlags window_flags)
54245429
{
5425-
IM_ASSERT(id != 0);
5426-
return BeginChildEx(NULL, id, size_arg, border, window_flags);
5430+
return BeginChildEx(NULL, id, size_arg, child_flags, window_flags);
54275431
}
54285432

5429-
bool ImGui::BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, bool border, ImGuiWindowFlags window_flags)
5433+
bool ImGui::BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, ImGuiChildFlags child_flags, ImGuiWindowFlags window_flags)
54305434
{
54315435
ImGuiContext& g = *GImGui;
54325436
ImGuiWindow* parent_window = g.CurrentWindow;
5437+
IM_ASSERT(id != 0);
5438+
54335439
window_flags |= ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_ChildWindow;
54345440
window_flags |= (parent_window->Flags & ImGuiWindowFlags_NoMove); // Inherit the NoMove flag
54355441

@@ -5452,7 +5458,7 @@ bool ImGui::BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, b
54525458
ImFormatStringToTempBuffer(&temp_window_name, NULL, "%s/%08X", parent_window->Name, id);
54535459

54545460
const float backup_border_size = g.Style.ChildBorderSize;
5455-
if (!border)
5461+
if ((child_flags & ImGuiChildFlags_Border) == 0)
54565462
g.Style.ChildBorderSize = 0.0f;
54575463

54585464
// Begin into window
@@ -5532,7 +5538,7 @@ bool ImGui::BeginChildFrame(ImGuiID id, const ImVec2& size, ImGuiWindowFlags ext
55325538
PushStyleVar(ImGuiStyleVar_ChildRounding, style.FrameRounding);
55335539
PushStyleVar(ImGuiStyleVar_ChildBorderSize, style.FrameBorderSize);
55345540
PushStyleVar(ImGuiStyleVar_WindowPadding, style.FramePadding);
5535-
bool ret = BeginChild(id, size, true, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysUseWindowPadding | extra_flags);
5541+
bool ret = BeginChild(id, size, ImGuiChildFlags_Border, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysUseWindowPadding | extra_flags);
55365542
PopStyleVar(3);
55375543
PopStyleColor();
55385544
return ret;
@@ -14787,7 +14793,7 @@ void ImGui::ShowDebugLogWindow(bool* p_open)
1478714793
SameLine();
1478814794
if (SmallButton("Copy"))
1478914795
SetClipboardText(g.DebugLogBuf.c_str());
14790-
BeginChild("##log", ImVec2(0.0f, 0.0f), true, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_AlwaysHorizontalScrollbar);
14796+
BeginChild("##log", ImVec2(0.0f, 0.0f), ImGuiChildFlags_Border, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_AlwaysHorizontalScrollbar);
1479114797

1479214798
ImGuiListClipper clipper;
1479314799
clipper.Begin(g.DebugLogIndex.size());

imgui.h

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// Library Version
2525
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
2626
#define IMGUI_VERSION "1.90 WIP"
27-
#define IMGUI_VERSION_NUM 18996
27+
#define IMGUI_VERSION_NUM 18997
2828
#define IMGUI_HAS_TABLE
2929

3030
/*
@@ -191,6 +191,7 @@ typedef int ImDrawListFlags; // -> enum ImDrawListFlags_ // Flags: f
191191
typedef int ImFontAtlasFlags; // -> enum ImFontAtlasFlags_ // Flags: for ImFontAtlas build
192192
typedef int ImGuiBackendFlags; // -> enum ImGuiBackendFlags_ // Flags: for io.BackendFlags
193193
typedef int ImGuiButtonFlags; // -> enum ImGuiButtonFlags_ // Flags: for InvisibleButton()
194+
typedef int ImGuiChildFlags; // -> enum ImGuiChildFlags_ // Flags: for BeginChild()
194195
typedef int ImGuiColorEditFlags; // -> enum ImGuiColorEditFlags_ // Flags: for ColorEdit4(), ColorPicker4() etc.
195196
typedef int ImGuiConfigFlags; // -> enum ImGuiConfigFlags_ // Flags: for io.ConfigFlags
196197
typedef int ImGuiComboFlags; // -> enum ImGuiComboFlags_ // Flags: for BeginCombo()
@@ -343,8 +344,8 @@ namespace ImGui
343344
// [Important: due to legacy reason, this is inconsistent with most other functions such as BeginMenu/EndMenu,
344345
// BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding BeginXXX function
345346
// returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.]
346-
IMGUI_API bool BeginChild(const char* str_id, const ImVec2& size = ImVec2(0, 0), bool border = false, ImGuiWindowFlags window_flags = 0);
347-
IMGUI_API bool BeginChild(ImGuiID id, const ImVec2& size = ImVec2(0, 0), bool border = false, ImGuiWindowFlags window_flags = 0);
347+
IMGUI_API bool BeginChild(const char* str_id, const ImVec2& size = ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0);
348+
IMGUI_API bool BeginChild(ImGuiID id, const ImVec2& size = ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0);
348349
IMGUI_API void EndChild();
349350

350351
// Windows Utilities
@@ -1010,6 +1011,14 @@ enum ImGuiWindowFlags_
10101011
ImGuiWindowFlags_ChildMenu = 1 << 28, // Don't use! For internal use by BeginMenu()
10111012
};
10121013

1014+
// Flags for ImGui::BeginChild()
1015+
// (Legacy: bit 0 must always correspond to ImGuiChildFlags_Border to be backward compatible with old API using 'bool border'.
1016+
enum ImGuiChildFlags_
1017+
{
1018+
ImGuiChildFlags_None = 0,
1019+
ImGuiChildFlags_Border = 1 << 0, // Show an outer border and enable WindowPadding. (Important: this is always == 1 for legacy reason)
1020+
};
1021+
10131022
// Flags for ImGui::InputText()
10141023
// (Those are per-item flags. There are shared flags in ImGuiIO: io.ConfigInputTextCursorBlink and io.ConfigInputTextEnterKeepActive)
10151024
enum ImGuiInputTextFlags_
@@ -3114,6 +3123,8 @@ namespace ImGui
31143123
namespace ImGui
31153124
{
31163125
// OBSOLETED in 1.90.0 (from September 2023)
3126+
static inline bool BeginChild(const char* str_id, const ImVec2& size_arg, bool border, ImGuiWindowFlags window_flags) { return BeginChild(str_id, size_arg, border ? ImGuiChildFlags_Border : ImGuiChildFlags_None, window_flags); }
3127+
static inline bool BeginChild(ImGuiID id, const ImVec2& size_arg, bool border, ImGuiWindowFlags window_flags) { return BeginChild(id, size_arg, border ? ImGuiChildFlags_Border : ImGuiChildFlags_None, window_flags); }
31173128
static inline void ShowStackToolWindow(bool* p_open = NULL) { ShowIDStackToolWindow(p_open); }
31183129
IMGUI_API bool ListBox(const char* label, int* current_item, bool (*old_callback)(void* user_data, int idx, const char** out_text), void* user_data, int items_count, int height_in_items = -1);
31193130
IMGUI_API bool Combo(const char* label, int* current_item, bool (*old_callback)(void* user_data, int idx, const char** out_text), void* user_data, int items_count, int popup_max_height_in_items = -1);

imgui_demo.cpp

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2591,7 +2591,7 @@ static void ShowDemoWindowWidgets()
25912591
static bool embed_all_inside_a_child_window = false;
25922592
ImGui::Checkbox("Embed everything inside a child window for testing _RootWindow flag.", &embed_all_inside_a_child_window);
25932593
if (embed_all_inside_a_child_window)
2594-
ImGui::BeginChild("outer_child", ImVec2(0, ImGui::GetFontSize() * 20.0f), true);
2594+
ImGui::BeginChild("outer_child", ImVec2(0, ImGui::GetFontSize() * 20.0f), ImGuiChildFlags_Border);
25952595

25962596
// Testing IsWindowFocused() function with its various flags.
25972597
ImGui::BulletText(
@@ -2639,7 +2639,7 @@ static void ShowDemoWindowWidgets()
26392639
ImGui::IsWindowHovered(ImGuiHoveredFlags_AnyWindow),
26402640
ImGui::IsWindowHovered(ImGuiHoveredFlags_Stationary));
26412641

2642-
ImGui::BeginChild("child", ImVec2(0, 50), true);
2642+
ImGui::BeginChild("child", ImVec2(0, 50), ImGuiChildFlags_Border);
26432643
ImGui::Text("This is another child window for testing the _ChildWindows flag.");
26442644
ImGui::EndChild();
26452645
if (embed_all_inside_a_child_window)
@@ -2723,7 +2723,7 @@ static void ShowDemoWindowLayout()
27232723
ImGuiWindowFlags window_flags = ImGuiWindowFlags_HorizontalScrollbar;
27242724
if (disable_mouse_wheel)
27252725
window_flags |= ImGuiWindowFlags_NoScrollWithMouse;
2726-
ImGui::BeginChild("ChildL", ImVec2(ImGui::GetContentRegionAvail().x * 0.5f, 260), false, window_flags);
2726+
ImGui::BeginChild("ChildL", ImVec2(ImGui::GetContentRegionAvail().x * 0.5f, 260), ImGuiChildFlags_None, window_flags);
27272727
for (int i = 0; i < 100; i++)
27282728
ImGui::Text("%04d: scrollable region", i);
27292729
ImGui::EndChild();
@@ -2739,7 +2739,7 @@ static void ShowDemoWindowLayout()
27392739
if (!disable_menu)
27402740
window_flags |= ImGuiWindowFlags_MenuBar;
27412741
ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 5.0f);
2742-
ImGui::BeginChild("ChildR", ImVec2(0, 260), true, window_flags);
2742+
ImGui::BeginChild("ChildR", ImVec2(0, 260), ImGuiChildFlags_Border, window_flags);
27432743
if (!disable_menu && ImGui::BeginMenuBar())
27442744
{
27452745
if (ImGui::BeginMenu("Menu"))
@@ -2780,14 +2780,15 @@ static void ShowDemoWindowLayout()
27802780

27812781
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + (float)offset_x);
27822782
ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(255, 0, 0, 100));
2783-
ImGui::BeginChild("Red", ImVec2(200, 100), true, ImGuiWindowFlags_None);
2783+
ImGui::BeginChild("Red", ImVec2(200, 100), ImGuiChildFlags_Border, ImGuiWindowFlags_None);
2784+
ImGui::PopStyleColor();
2785+
27842786
for (int n = 0; n < 50; n++)
27852787
ImGui::Text("Some test %d", n);
27862788
ImGui::EndChild();
27872789
bool child_is_hovered = ImGui::IsItemHovered();
27882790
ImVec2 child_rect_min = ImGui::GetItemRectMin();
27892791
ImVec2 child_rect_max = ImGui::GetItemRectMax();
2790-
ImGui::PopStyleColor();
27912792
ImGui::Text("Hovered: %d", child_is_hovered);
27922793
ImGui::Text("Rect of child window is: (%.0f,%.0f) (%.0f,%.0f)", child_rect_min.x, child_rect_min.y, child_rect_max.x, child_rect_max.y);
27932794
}
@@ -3176,7 +3177,7 @@ static void ShowDemoWindowLayout()
31763177

31773178
const ImGuiWindowFlags child_flags = enable_extra_decorations ? ImGuiWindowFlags_MenuBar : 0;
31783179
const ImGuiID child_id = ImGui::GetID((void*)(intptr_t)i);
3179-
const bool child_is_visible = ImGui::BeginChild(child_id, ImVec2(child_w, 200.0f), true, child_flags);
3180+
const bool child_is_visible = ImGui::BeginChild(child_id, ImVec2(child_w, 200.0f), ImGuiChildFlags_Border, child_flags);
31803181
if (ImGui::BeginMenuBar())
31813182
{
31823183
ImGui::TextUnformatted("abc");
@@ -3223,7 +3224,7 @@ static void ShowDemoWindowLayout()
32233224
float child_height = ImGui::GetTextLineHeight() + style.ScrollbarSize + style.WindowPadding.y * 2.0f;
32243225
ImGuiWindowFlags child_flags = ImGuiWindowFlags_HorizontalScrollbar | (enable_extra_decorations ? ImGuiWindowFlags_AlwaysVerticalScrollbar : 0);
32253226
ImGuiID child_id = ImGui::GetID((void*)(intptr_t)i);
3226-
bool child_is_visible = ImGui::BeginChild(child_id, ImVec2(-100, child_height), true, child_flags);
3227+
bool child_is_visible = ImGui::BeginChild(child_id, ImVec2(-100, child_height), ImGuiChildFlags_Border, child_flags);
32273228
if (scroll_to_off)
32283229
ImGui::SetScrollX(scroll_to_off_px);
32293230
if (scroll_to_pos)
@@ -3265,7 +3266,7 @@ static void ShowDemoWindowLayout()
32653266
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 3.0f);
32663267
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(2.0f, 1.0f));
32673268
ImVec2 scrolling_child_size = ImVec2(0, ImGui::GetFrameHeightWithSpacing() * 7 + 30);
3268-
ImGui::BeginChild("scrolling", scrolling_child_size, true, ImGuiWindowFlags_HorizontalScrollbar);
3269+
ImGui::BeginChild("scrolling", scrolling_child_size, ImGuiChildFlags_Border, ImGuiWindowFlags_HorizontalScrollbar);
32693270
for (int line = 0; line < lines; line++)
32703271
{
32713272
// Display random stuff. For the sake of this trivial demo we are using basic Button() + SameLine()
@@ -3409,7 +3410,7 @@ static void ShowDemoWindowLayout()
34093410
}
34103411
if (show_child)
34113412
{
3412-
ImGui::BeginChild("child", ImVec2(0, 0), true);
3413+
ImGui::BeginChild("child", ImVec2(0, 0), ImGuiChildFlags_Border);
34133414
ImGui::EndChild();
34143415
}
34153416
ImGui::End();
@@ -5958,7 +5959,7 @@ static void ShowDemoWindowColumns()
59585959
{
59595960
ImGui::SetNextWindowContentSize(ImVec2(1500.0f, 0.0f));
59605961
ImVec2 child_size = ImVec2(0, ImGui::GetFontSize() * 20.0f);
5961-
ImGui::BeginChild("##ScrollingRegion", child_size, false, ImGuiWindowFlags_HorizontalScrollbar);
5962+
ImGui::BeginChild("##ScrollingRegion", child_size, ImGuiChildFlags_None, ImGuiWindowFlags_HorizontalScrollbar);
59625963
ImGui::Columns(10);
59635964

59645965
// Also demonstrate using clipper for large vertical lists
@@ -6575,7 +6576,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
65756576
"Left-click on color square to open color picker,\n"
65766577
"Right-click to open edit options menu.");
65776578

6578-
ImGui::BeginChild("##colors", ImVec2(0, 0), true, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_AlwaysHorizontalScrollbar | ImGuiWindowFlags_NavFlattened);
6579+
ImGui::BeginChild("##colors", ImVec2(0, 0), ImGuiChildFlags_Border, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_AlwaysHorizontalScrollbar | ImGuiWindowFlags_NavFlattened);
65796580
ImGui::PushItemWidth(ImGui::GetFontSize() * -12);
65806581
for (int i = 0; i < ImGuiCol_COUNT; i++)
65816582
{
@@ -6802,7 +6803,7 @@ static void ShowExampleMenuFile()
68026803
{
68036804
static bool enabled = true;
68046805
ImGui::MenuItem("Enabled", "", &enabled);
6805-
ImGui::BeginChild("child", ImVec2(0, 60), true);
6806+
ImGui::BeginChild("child", ImVec2(0, 60), ImGuiChildFlags_Border);
68066807
for (int i = 0; i < 10; i++)
68076808
ImGui::Text("Scrolling Text %d", i);
68086809
ImGui::EndChild();
@@ -6968,7 +6969,7 @@ struct ExampleAppConsole
69686969

69696970
// Reserve enough left-over height for 1 separator + 1 input text
69706971
const float footer_height_to_reserve = ImGui::GetStyle().ItemSpacing.y + ImGui::GetFrameHeightWithSpacing();
6971-
if (ImGui::BeginChild("ScrollingRegion", ImVec2(0, -footer_height_to_reserve), false, ImGuiWindowFlags_HorizontalScrollbar))
6972+
if (ImGui::BeginChild("ScrollingRegion", ImVec2(0, -footer_height_to_reserve), ImGuiChildFlags_None, ImGuiWindowFlags_HorizontalScrollbar))
69726973
{
69736974
if (ImGui::BeginPopupContextWindow())
69746975
{
@@ -7279,7 +7280,7 @@ struct ExampleAppLog
72797280

72807281
ImGui::Separator();
72817282

7282-
if (ImGui::BeginChild("scrolling", ImVec2(0, 0), false, ImGuiWindowFlags_HorizontalScrollbar))
7283+
if (ImGui::BeginChild("scrolling", ImVec2(0, 0), ImGuiChildFlags_None, ImGuiWindowFlags_HorizontalScrollbar))
72837284
{
72847285
if (clear)
72857286
Clear();
@@ -7398,7 +7399,7 @@ static void ShowExampleAppLayout(bool* p_open)
73987399
// Left
73997400
static int selected = 0;
74007401
{
7401-
ImGui::BeginChild("left pane", ImVec2(150, 0), true);
7402+
ImGui::BeginChild("left pane", ImVec2(150, 0), ImGuiChildFlags_Border);
74027403
for (int i = 0; i < 100; i++)
74037404
{
74047405
// FIXME: Good candidate to use ImGuiSelectableFlags_SelectOnNav
@@ -7967,7 +7968,7 @@ static void ShowExampleAppCustomRendering(bool* p_open)
79677968
// To use a child window instead we could use, e.g:
79687969
// ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0, 0)); // Disable padding
79697970
// ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(50, 50, 50, 255)); // Set a background color
7970-
// ImGui::BeginChild("canvas", ImVec2(0.0f, 0.0f), true, ImGuiWindowFlags_NoMove);
7971+
// ImGui::BeginChild("canvas", ImVec2(0.0f, 0.0f), ImGuiChildFlags_Border, ImGuiWindowFlags_NoMove);
79717972
// ImGui::PopStyleColor();
79727973
// ImGui::PopStyleVar();
79737974
// [...]

imgui_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3006,7 +3006,7 @@ namespace ImGui
30063006
IMGUI_API void LogSetNextTextDecoration(const char* prefix, const char* suffix);
30073007

30083008
// Popups, Modals, Tooltips
3009-
IMGUI_API bool BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, bool border, ImGuiWindowFlags window_flags);
3009+
IMGUI_API bool BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, ImGuiChildFlags child_flags, ImGuiWindowFlags window_flags);
30103010
IMGUI_API void OpenPopupEx(ImGuiID id, ImGuiPopupFlags popup_flags = ImGuiPopupFlags_None);
30113011
IMGUI_API void ClosePopupToLevel(int remaining, bool restore_focus_to_window_under_popup);
30123012
IMGUI_API void ClosePopupsOverWindow(ImGuiWindow* ref_window, bool restore_focus_to_window_under_popup);

0 commit comments

Comments
 (0)