@@ -2813,8 +2813,8 @@ void ImGui::RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool border,
2813
2813
const float border_size = g.Style.FrameBorderSize;
2814
2814
if (border && border_size > 0.0f)
2815
2815
{
2816
- window->DrawList->AddRect(p_min + ImVec2(1, 1), p_max + ImVec2(1, 1), GetColorU32(ImGuiCol_BorderShadow), rounding, ImDrawCornerFlags_All , border_size);
2817
- window->DrawList->AddRect(p_min, p_max, GetColorU32(ImGuiCol_Border), rounding, ImDrawCornerFlags_All , border_size);
2816
+ window->DrawList->AddRect(p_min + ImVec2(1, 1), p_max + ImVec2(1, 1), GetColorU32(ImGuiCol_BorderShadow), rounding, 0 , border_size);
2817
+ window->DrawList->AddRect(p_min, p_max, GetColorU32(ImGuiCol_Border), rounding, 0 , border_size);
2818
2818
}
2819
2819
}
2820
2820
@@ -2825,8 +2825,8 @@ void ImGui::RenderFrameBorder(ImVec2 p_min, ImVec2 p_max, float rounding)
2825
2825
const float border_size = g.Style.FrameBorderSize;
2826
2826
if (border_size > 0.0f)
2827
2827
{
2828
- window->DrawList->AddRect(p_min + ImVec2(1, 1), p_max + ImVec2(1, 1), GetColorU32(ImGuiCol_BorderShadow), rounding, ImDrawCornerFlags_All , border_size);
2829
- window->DrawList->AddRect(p_min, p_max, GetColorU32(ImGuiCol_Border), rounding, ImDrawCornerFlags_All , border_size);
2828
+ window->DrawList->AddRect(p_min + ImVec2(1, 1), p_max + ImVec2(1, 1), GetColorU32(ImGuiCol_BorderShadow), rounding, 0 , border_size);
2829
+ window->DrawList->AddRect(p_min, p_max, GetColorU32(ImGuiCol_Border), rounding, 0 , border_size);
2830
2830
}
2831
2831
}
2832
2832
@@ -2852,13 +2852,13 @@ void ImGui::RenderNavHighlight(const ImRect& bb, ImGuiID id, ImGuiNavHighlightFl
2852
2852
bool fully_visible = window->ClipRect.Contains(display_rect);
2853
2853
if (!fully_visible)
2854
2854
window->DrawList->PushClipRect(display_rect.Min, display_rect.Max);
2855
- window->DrawList->AddRect(display_rect.Min + ImVec2(THICKNESS * 0.5f, THICKNESS * 0.5f), display_rect.Max - ImVec2(THICKNESS * 0.5f, THICKNESS * 0.5f), GetColorU32(ImGuiCol_NavHighlight), rounding, ImDrawCornerFlags_All , THICKNESS);
2855
+ window->DrawList->AddRect(display_rect.Min + ImVec2(THICKNESS * 0.5f, THICKNESS * 0.5f), display_rect.Max - ImVec2(THICKNESS * 0.5f, THICKNESS * 0.5f), GetColorU32(ImGuiCol_NavHighlight), rounding, 0 , THICKNESS);
2856
2856
if (!fully_visible)
2857
2857
window->DrawList->PopClipRect();
2858
2858
}
2859
2859
if (flags & ImGuiNavHighlightFlags_TypeThin)
2860
2860
{
2861
- window->DrawList->AddRect(display_rect.Min, display_rect.Max, GetColorU32(ImGuiCol_NavHighlight), rounding, ~ 0, 1.0f);
2861
+ window->DrawList->AddRect(display_rect.Min, display_rect.Max, GetColorU32(ImGuiCol_NavHighlight), rounding, 0, 1.0f);
2862
2862
}
2863
2863
}
2864
2864
@@ -5446,7 +5446,7 @@ static void ImGui::RenderWindowOuterBorders(ImGuiWindow* window)
5446
5446
float rounding = window->WindowRounding;
5447
5447
float border_size = window->WindowBorderSize;
5448
5448
if (border_size > 0.0f && !(window->Flags & ImGuiWindowFlags_NoBackground))
5449
- window->DrawList->AddRect(window->Pos, window->Pos + window->Size, GetColorU32(ImGuiCol_Border), rounding, ImDrawCornerFlags_All , border_size);
5449
+ window->DrawList->AddRect(window->Pos, window->Pos + window->Size, GetColorU32(ImGuiCol_Border), rounding, 0 , border_size);
5450
5450
5451
5451
int border_held = window->ResizeBorderHeld;
5452
5452
if (border_held != -1)
@@ -5504,22 +5504,22 @@ void ImGui::RenderWindowDecorations(ImGuiWindow* window, const ImRect& title_bar
5504
5504
}
5505
5505
if (override_alpha)
5506
5506
bg_col = (bg_col & ~IM_COL32_A_MASK) | (IM_F32_TO_INT8_SAT(alpha) << IM_COL32_A_SHIFT);
5507
- window->DrawList->AddRectFilled(window->Pos + ImVec2(0, window->TitleBarHeight()), window->Pos + window->Size, bg_col, window_rounding, (flags & ImGuiWindowFlags_NoTitleBar) ? ImDrawCornerFlags_All : ImDrawCornerFlags_Bot );
5507
+ window->DrawList->AddRectFilled(window->Pos + ImVec2(0, window->TitleBarHeight()), window->Pos + window->Size, bg_col, window_rounding, (flags & ImGuiWindowFlags_NoTitleBar) ? 0 : ImDrawFlags_NoRoundCornerT );
5508
5508
}
5509
5509
5510
5510
// Title bar
5511
5511
if (!(flags & ImGuiWindowFlags_NoTitleBar))
5512
5512
{
5513
5513
ImU32 title_bar_col = GetColorU32(title_bar_is_highlight ? ImGuiCol_TitleBgActive : ImGuiCol_TitleBg);
5514
- window->DrawList->AddRectFilled(title_bar_rect.Min, title_bar_rect.Max, title_bar_col, window_rounding, ImDrawCornerFlags_Top );
5514
+ window->DrawList->AddRectFilled(title_bar_rect.Min, title_bar_rect.Max, title_bar_col, window_rounding, ImDrawFlags_NoRoundCornerB );
5515
5515
}
5516
5516
5517
5517
// Menu bar
5518
5518
if (flags & ImGuiWindowFlags_MenuBar)
5519
5519
{
5520
5520
ImRect menu_bar_rect = window->MenuBarRect();
5521
5521
menu_bar_rect.ClipWith(window->Rect()); // Soft clipping, in particular child window don't have minimum size covering the menu bar so this is useful for them.
5522
- window->DrawList->AddRectFilled(menu_bar_rect.Min + ImVec2(window_border_size, 0), menu_bar_rect.Max - ImVec2(window_border_size, 0), GetColorU32(ImGuiCol_MenuBarBg), (flags & ImGuiWindowFlags_NoTitleBar) ? window_rounding : 0.0f, ImDrawCornerFlags_Top );
5522
+ window->DrawList->AddRectFilled(menu_bar_rect.Min + ImVec2(window_border_size, 0), menu_bar_rect.Max - ImVec2(window_border_size, 0), GetColorU32(ImGuiCol_MenuBarBg), (flags & ImGuiWindowFlags_NoTitleBar) ? window_rounding : 0.0f, ImDrawFlags_NoRoundCornerB );
5523
5523
if (style.FrameBorderSize > 0.0f && menu_bar_rect.Max.y < window->Pos.y + window->Size.y)
5524
5524
window->DrawList->AddLine(menu_bar_rect.GetBL(), menu_bar_rect.GetBR(), GetColorU32(ImGuiCol_Border), style.FrameBorderSize);
5525
5525
}
@@ -6136,7 +6136,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
6136
6136
bb.Expand(-g.FontSize - 1.0f);
6137
6137
rounding = window->WindowRounding;
6138
6138
}
6139
- window->DrawList->AddRect(bb.Min, bb.Max, GetColorU32(ImGuiCol_NavWindowingHighlight, g.NavWindowingHighlightAlpha), rounding, ~ 0, 3.0f);
6139
+ window->DrawList->AddRect(bb.Min, bb.Max, GetColorU32(ImGuiCol_NavWindowingHighlight, g.NavWindowingHighlightAlpha), rounding, 0, 3.0f);
6140
6140
}
6141
6141
6142
6142
// UPDATE RECTANGLES (2- THOSE AFFECTED BY SCROLLING)
@@ -9918,7 +9918,7 @@ const ImGuiPayload* ImGui::AcceptDragDropPayload(const char* type, ImGuiDragDrop
9918
9918
r.Expand(3.5f);
9919
9919
bool push_clip_rect = !window->ClipRect.Contains(r);
9920
9920
if (push_clip_rect) window->DrawList->PushClipRect(r.Min - ImVec2(1, 1), r.Max + ImVec2(1, 1));
9921
- window->DrawList->AddRect(r.Min, r.Max, GetColorU32(ImGuiCol_DragDropTarget), 0.0f, ~ 0, 2.0f);
9921
+ window->DrawList->AddRect(r.Min, r.Max, GetColorU32(ImGuiCol_DragDropTarget), 0.0f, 0, 2.0f);
9922
9922
if (push_clip_rect) window->DrawList->PopClipRect();
9923
9923
}
9924
9924
@@ -10902,7 +10902,7 @@ void ImGui::ShowMetricsWindow(bool* p_open)
10902
10902
10903
10903
BulletText("Table 0x%08X (%d columns, in '%s')", table->ID, table->ColumnsCount, table->OuterWindow->Name);
10904
10904
if (IsItemHovered())
10905
- GetForegroundDrawList()->AddRect(table->OuterRect.Min - ImVec2(1, 1), table->OuterRect.Max + ImVec2(1, 1), IM_COL32(255, 255, 0, 255), 0.0f, ~ 0, 2.0f);
10905
+ GetForegroundDrawList()->AddRect(table->OuterRect.Min - ImVec2(1, 1), table->OuterRect.Max + ImVec2(1, 1), IM_COL32(255, 255, 0, 255), 0.0f, 0, 2.0f);
10906
10906
Indent();
10907
10907
char buf[128];
10908
10908
for (int rect_n = 0; rect_n < TRT_Count; rect_n++)
@@ -10917,7 +10917,7 @@ void ImGui::ShowMetricsWindow(bool* p_open)
10917
10917
ImFormatString(buf, IM_ARRAYSIZE(buf), "(%6.1f,%6.1f) (%6.1f,%6.1f) Size (%6.1f,%6.1f) Col %d %s", r.Min.x, r.Min.y, r.Max.x, r.Max.y, r.GetWidth(), r.GetHeight(), column_n, trt_rects_names[rect_n]);
10918
10918
Selectable(buf);
10919
10919
if (IsItemHovered())
10920
- GetForegroundDrawList()->AddRect(r.Min - ImVec2(1, 1), r.Max + ImVec2(1, 1), IM_COL32(255, 255, 0, 255), 0.0f, ~ 0, 2.0f);
10920
+ GetForegroundDrawList()->AddRect(r.Min - ImVec2(1, 1), r.Max + ImVec2(1, 1), IM_COL32(255, 255, 0, 255), 0.0f, 0, 2.0f);
10921
10921
}
10922
10922
}
10923
10923
else
@@ -10926,7 +10926,7 @@ void ImGui::ShowMetricsWindow(bool* p_open)
10926
10926
ImFormatString(buf, IM_ARRAYSIZE(buf), "(%6.1f,%6.1f) (%6.1f,%6.1f) Size (%6.1f,%6.1f) %s", r.Min.x, r.Min.y, r.Max.x, r.Max.y, r.GetWidth(), r.GetHeight(), trt_rects_names[rect_n]);
10927
10927
Selectable(buf);
10928
10928
if (IsItemHovered())
10929
- GetForegroundDrawList()->AddRect(r.Min - ImVec2(1, 1), r.Max + ImVec2(1, 1), IM_COL32(255, 255, 0, 255), 0.0f, ~ 0, 2.0f);
10929
+ GetForegroundDrawList()->AddRect(r.Min - ImVec2(1, 1), r.Max + ImVec2(1, 1), IM_COL32(255, 255, 0, 255), 0.0f, 0, 2.0f);
10930
10930
}
10931
10931
}
10932
10932
Unindent();
@@ -11132,7 +11132,7 @@ void ImGui::ShowMetricsWindow(bool* p_open)
11132
11132
ImRect r = Funcs::GetTableRect(table, cfg->ShowTablesRectsType, column_n);
11133
11133
ImU32 col = (table->HoveredColumnBody == column_n) ? IM_COL32(255, 255, 128, 255) : IM_COL32(255, 0, 128, 255);
11134
11134
float thickness = (table->HoveredColumnBody == column_n) ? 3.0f : 1.0f;
11135
- draw_list->AddRect(r.Min, r.Max, col, 0.0f, ~ 0, thickness);
11135
+ draw_list->AddRect(r.Min, r.Max, col, 0.0f, 0, thickness);
11136
11136
}
11137
11137
}
11138
11138
else
0 commit comments