|
|
|
@ -5083,10 +5083,10 @@ static ImRect GetResizeBorderRect(ImGuiWindow* window, int border_n, float perp_
|
|
|
|
|
{
|
|
|
|
|
ImRect rect = window->Rect();
|
|
|
|
|
if (thickness == 0.0f) rect.Max -= ImVec2(1,1);
|
|
|
|
|
if (border_n == 0) return ImRect(rect.Min.x + perp_padding, rect.Min.y - thickness, rect.Max.x - perp_padding, rect.Min.y + thickness); // Top
|
|
|
|
|
if (border_n == 1) return ImRect(rect.Max.x - thickness, rect.Min.y + perp_padding, rect.Max.x + thickness, rect.Max.y - perp_padding); // Right
|
|
|
|
|
if (border_n == 2) return ImRect(rect.Min.x + perp_padding, rect.Max.y - thickness, rect.Max.x - perp_padding, rect.Max.y + thickness); // Bottom
|
|
|
|
|
if (border_n == 3) return ImRect(rect.Min.x - thickness, rect.Min.y + perp_padding, rect.Min.x + thickness, rect.Max.y - perp_padding); // Left
|
|
|
|
|
if (border_n == 0) { return ImRect(rect.Min.x + perp_padding, rect.Min.y - thickness, rect.Max.x - perp_padding, rect.Min.y + thickness); } // Top
|
|
|
|
|
if (border_n == 1) { return ImRect(rect.Max.x - thickness, rect.Min.y + perp_padding, rect.Max.x + thickness, rect.Max.y - perp_padding); } // Right
|
|
|
|
|
if (border_n == 2) { return ImRect(rect.Min.x + perp_padding, rect.Max.y - thickness, rect.Max.x - perp_padding, rect.Max.y + thickness); } // Bottom
|
|
|
|
|
if (border_n == 3) { return ImRect(rect.Min.x - thickness, rect.Min.y + perp_padding, rect.Min.x + thickness, rect.Max.y - perp_padding); } // Left
|
|
|
|
|
IM_ASSERT(0);
|
|
|
|
|
return ImRect();
|
|
|
|
|
}
|
|
|
|
|