1
0
Fork 0
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:
ocornut 2016-05-16 20:14:07 +02:00
parent 47d10944a5
commit 69a29e4715
3 changed files with 14 additions and 2 deletions

View file

@ -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();