MCPcopy Create free account
hub / github.com/Wemino/MarkerPatch / CalcNextTotalWidth

Method CalcNextTotalWidth

include/imgui/imgui_widgets.cpp:9117–9136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9115}
9116
9117void ImGuiMenuColumns::CalcNextTotalWidth(bool update_offsets)
9118{
9119 ImU16 offset = 0;
9120 bool want_spacing = false;
9121 for (int i = 0; i < IM_COUNTOF(Widths); i++)
9122 {
9123 ImU16 width = Widths[i];
9124 if (want_spacing && width > 0)
9125 offset += Spacing;
9126 want_spacing |= (width > 0);
9127 if (update_offsets)
9128 {
9129 if (i == 1) { OffsetLabel = offset; }
9130 if (i == 2) { OffsetShortcut = offset; }
9131 if (i == 3) { OffsetMark = offset; }
9132 }
9133 offset += width;
9134 }
9135 NextTotalWidth = offset;
9136}
9137
9138float ImGuiMenuColumns::DeclColumns(float w_icon, float w_label, float w_shortcut, float w_mark)
9139{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected