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

Method Bullet

imgui_tiny_app/imgui/imgui_widgets.cpp:1492–1513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1490}
1491
1492void ImGui::Bullet()
1493{
1494 ImGuiWindow* window = GetCurrentWindow();
1495 if (window->SkipItems)
1496 return;
1497
1498 ImGuiContext& g = *GImGui;
1499 const ImGuiStyle& style = g.Style;
1500 const float line_height = ImMax(ImMin(window->DC.CurrLineSize.y, g.FontSize + style.FramePadding.y * 2), g.FontSize);
1501 const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(g.FontSize, line_height));
1502 ItemSize(bb);
1503 if (!ItemAdd(bb, 0))
1504 {
1505 SameLine(0, style.FramePadding.x * 2);
1506 return;
1507 }
1508
1509 // Render and stay on same line
1510 ImU32 text_col = GetColorU32(ImGuiCol_Text);
1511 RenderBullet(window->DrawList, bb.Min + ImVec2(style.FramePadding.x + g.FontSize * 0.5f, line_height * 0.5f), text_col);
1512 SameLine(0, style.FramePadding.x * 2.0f);
1513}
1514
1515// This is provided as a convenience for being an often requested feature.
1516// FIXME-STYLE: we delayed adding as there is a larger plan to revamp the styling system.

Callers

nothing calls this directly

Calls 5

GetCurrentWindowFunction · 0.85
ImMaxFunction · 0.85
ImMinFunction · 0.85
ImVec2Function · 0.85
ItemSizeFunction · 0.85

Tested by

no test coverage detected