mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Indent(), Unindent(): Allow passing negative values.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user