openplanet-nl / issues

Issue tracker for Openplanet.
10 stars 0 forks source link

1.26.21: `UI::BeginChild("blah", vec2(-1, 140), true, UI::WindowFlags::AlwaysVerticalScrollbar | UI::ChildFlags::AlwaysAutoResize)` throws #483

Closed XertroV closed 2 months ago

XertroV commented 2 months ago

1.26.21: UI::BeginChild("blah", vec2(-1, 140), true, UI::WindowFlags::AlwaysVerticalScrollbar | UI::ChildFlags::AlwaysAutoResize) throws: UI assertion failed: (window_flags & ImGuiWindowFlags_AlwaysAutoResize) == 0 && "Cannot specify ImGuiWindowFlags_AlwaysAutoResize for BeginChild(). Use ImGuiChildFlags_AlwaysAutoResize!"

codecat commented 2 months ago

Use the child flags parameter instead of the window flags parameter for child flags.

codecat commented 2 months ago

For clarification, this should be:

UI::BeginChild(
  "blah",
  vec2(-1, 140),
  UI::ChildFlags::AlwaysAutoResize | UI::ChildFlags::Border,
  UI::WindowFlags::AlwaysVerticalScrollbar
);
XertroV commented 2 months ago

ah so the bool was coerced and no compile error thrown

XertroV commented 2 months ago

Maybe function signature changes should be added to the changelog