mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-30 03:10:06 +00:00
Added NewLine() (very shy reminder that #97 isn't done)
This commit is contained in:
parent
47d10944a5
commit
69a29e4715
3 changed files with 14 additions and 2 deletions
11
imgui.cpp
11
imgui.cpp
|
|
@ -9122,6 +9122,17 @@ void ImGui::SameLine(float pos_x, float spacing_w)
|
|||
window->DC.CurrentLineTextBaseOffset = window->DC.PrevLineTextBaseOffset;
|
||||
}
|
||||
|
||||
void ImGui::NewLine()
|
||||
{
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
if (window->SkipItems)
|
||||
return;
|
||||
if (window->DC.CurrentLineHeight > 0.0f) // In the event that we are on a line with items that is smaller that FontSize high, we will preserve its height.
|
||||
ItemSize(ImVec2(0,0));
|
||||
else
|
||||
ItemSize(ImVec2(0.0f, GImGui->FontSize));
|
||||
}
|
||||
|
||||
void ImGui::NextColumn()
|
||||
{
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue