MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / SameLineOrWrap

Function SameLineOrWrap

imgui_tiny_app/imgui/imgui.cpp:23757–23764  ·  view source on GitHub ↗

FIXME-LAYOUT: To be done automatically via layout mode once we rework ItemSize/ItemAdd into ItemLayout.

Source from the content-addressed store, hash-verified

23755
23756// FIXME-LAYOUT: To be done automatically via layout mode once we rework ItemSize/ItemAdd into ItemLayout.
23757static void SameLineOrWrap(const ImVec2& size)
23758{
23759 ImGuiContext& g = *GImGui;
23760 ImGuiWindow* window = g.CurrentWindow;
23761 ImVec2 pos(window->DC.CursorPosPrevLine.x + g.Style.ItemSpacing.x, window->DC.CursorPosPrevLine.y);
23762 if (window->WorkRect.Contains(ImRect(pos, pos + size)))
23763 ImGui::SameLine();
23764}
23765
23766static void ShowDebugLogFlag(const char* name, ImGuiDebugLogFlags flags)
23767{

Callers 1

ShowDebugLogFlagFunction · 0.85

Calls 2

ImRectFunction · 0.70
ContainsMethod · 0.45

Tested by

no test coverage detected