| 11387 | SameLine(); |
| 11388 | } |
| 11389 | IM_MSVC_RUNTIME_CHECKS_RESTORE |
| 11390 | |
| 11391 | // Gets back to previous line and continue with horizontal layout |
| 11392 | // offset_from_start_x == 0 : follow right after previous item |
| 11393 | // offset_from_start_x != 0 : align to specified x position (relative to window/group left) |
| 11394 | // spacing_w < 0 : use default spacing if offset_from_start_x == 0, no spacing if offset_from_start_x != 0 |
| 11395 | // spacing_w >= 0 : enforce spacing amount |
| 11396 | void ImGui::SameLine(float offset_from_start_x, float spacing_w) |
| 11397 | { |
| 11398 | ImGuiContext& g = *GImGui; |
| 11399 | ImGuiWindow* window = g.CurrentWindow; |
| 11400 | if (window->SkipItems) |
| 11401 | return; |
| 11402 | |
| 11403 | if (offset_from_start_x != 0.0f) |
| 11404 | { |
| 11405 | if (spacing_w < 0.0f) |
| 11406 | spacing_w = 0.0f; |
| 11407 | window->DC.CursorPos.x = window->Pos.x - window->Scroll.x + offset_from_start_x + spacing_w + window->DC.GroupOffset.x + window->DC.ColumnsOffset.x; |
| 11408 | window->DC.CursorPos.y = window->DC.CursorPosPrevLine.y; |
| 11409 | } |
| 11410 | else |
| 11411 | { |
| 11412 | if (spacing_w < 0.0f) |
| 11413 | spacing_w = g.Style.ItemSpacing.x; |
| 11414 | window->DC.CursorPos.x = window->DC.CursorPosPrevLine.x + spacing_w; |
| 11415 | window->DC.CursorPos.y = window->DC.CursorPosPrevLine.y; |
| 11416 | } |
| 11417 | window->DC.CurrLineSize = window->DC.PrevLineSize; |
| 11418 | window->DC.CurrLineTextBaseOffset = window->DC.PrevLineTextBaseOffset; |
| 11419 | window->DC.IsSameLine = true; |
| 11420 | } |
| 11421 | |
| 11422 | ImVec2 ImGui::GetCursorScreenPos() |
| 11423 | { |
nothing calls this directly
no outgoing calls
no test coverage detected