1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

ImStrv: changed ImStrv xxx=NULL args to an explicit xxx=ImStrv()

This is mostly for the benefit of cimgui parser, ideally we would do without.
This commit is contained in:
ocornut 2021-02-01 17:04:50 +01:00 committed by ocornut
parent ef598afc79
commit b50672a003
3 changed files with 28 additions and 28 deletions

View file

@ -9271,7 +9271,7 @@ bool ImGui::BeginMenuEx(ImStrv label, ImStrv icon, bool enabled)
// Menu inside a regular/vertical menu
// (In a typical menu window where all items are BeginMenu() or MenuItem() calls, extra_w will always be 0.0f.
// Only when they are other items sticking out we're going to add spacing, yet only register minimum width into the layout system.)
float icon_w = !icon.empty() ? CalcTextSize(icon, NULL).x : 0.0f;
float icon_w = !icon.empty() ? CalcTextSize(icon).x : 0.0f;
float checkmark_w = IM_TRUNC(g.FontSize * 1.20f);
float min_w = window->DC.MenuColumns.DeclColumns(icon_w, label_size.x, 0.0f, checkmark_w); // Feedback to next frame
float extra_w = ImMax(0.0f, GetContentRegionAvail().x - min_w);