mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-29 03:00:05 +00:00
Indent(), Unindent(): Allow passing negative values.
This commit is contained in:
parent
7f2b9ea4c0
commit
97edd42fc0
2 changed files with 4 additions and 4 deletions
|
|
@ -10892,7 +10892,7 @@ void ImGui::Indent(float indent_w)
|
|||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
window->DC.IndentX += (indent_w > 0.0f) ? indent_w : g.Style.IndentSpacing;
|
||||
window->DC.IndentX += (indent_w != 0.0f) ? indent_w : g.Style.IndentSpacing;
|
||||
window->DC.CursorPos.x = window->Pos.x + window->DC.IndentX + window->DC.ColumnsOffsetX;
|
||||
}
|
||||
|
||||
|
|
@ -10900,7 +10900,7 @@ void ImGui::Unindent(float indent_w)
|
|||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
window->DC.IndentX -= (indent_w > 0.0f) ? indent_w : g.Style.IndentSpacing;
|
||||
window->DC.IndentX -= (indent_w != 0.0f) ? indent_w : g.Style.IndentSpacing;
|
||||
window->DC.CursorPos.x = window->Pos.x + window->DC.IndentX + window->DC.ColumnsOffsetX;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue