mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Comments, adding some spacing in ImVec2() constructors.
This commit is contained in:
parent
3f26a07ee1
commit
41e8837f59
@ -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();
|
||||
}
|
||||
|
3
imgui.h
3
imgui.h
@ -268,9 +268,10 @@ namespace ImGui
|
||||
|
||||
// Windows
|
||||
// - Begin() = push window to the stack and start appending to it. End() = pop window from the stack.
|
||||
// - You may append multiple times to the same window during the same frame.
|
||||
// - Passing 'bool* p_open != NULL' shows a window-closing widget in the upper-right corner of the window,
|
||||
// which clicking will set the boolean to false when clicked.
|
||||
// - You may append multiple times to the same window during the same frame by calling Begin()/End() pairs multiple times.
|
||||
// Some information such as 'flags' or 'p_open' will only be considered by the first call to Begin().
|
||||
// - Begin() return false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting
|
||||
// anything to the window. Always call a matching End() for each Begin() call, regardless of its return value!
|
||||
// [Important: due to legacy reason, this is inconsistent with most other functions such as BeginMenu/EndMenu,
|
||||
|
Loading…
Reference in New Issue
Block a user