| 1490 | } |
| 1491 | |
| 1492 | void 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. |
nothing calls this directly
no test coverage detected