|
@@ -950,7 +950,7 @@ void ImGui::Scrollbar(ImGuiAxis axis)
|
|
// - We store values as normalized ratio and in a form that allows the window content to change while we are holding on a scrollbar
|
|
// - We store values as normalized ratio and in a form that allows the window content to change while we are holding on a scrollbar
|
|
// - We handle both horizontal and vertical scrollbars, which makes the terminology not ideal.
|
|
// - We handle both horizontal and vertical scrollbars, which makes the terminology not ideal.
|
|
// Still, the code should probably be made simpler..
|
|
// Still, the code should probably be made simpler..
|
|
-bool ImGui::ScrollbarEx(const ImRect& bb_frame, ImGuiID id, ImGuiAxis axis, ImS64* p_scroll_v, ImS64 size_visible_v, ImS64 size_contents_v, ImDrawFlags flags)
|
|
|
|
|
|
+bool ImGui::ScrollbarEx(const ImRect& bb_frame, ImGuiID id, ImGuiAxis axis, ImS64* p_scroll_v, ImS64 size_visible_v, ImS64 size_contents_v, ImDrawFlags draw_rounding_flags)
|
|
{
|
|
{
|
|
ImGuiContext& g = *GImGui;
|
|
ImGuiContext& g = *GImGui;
|
|
ImGuiWindow* window = g.CurrentWindow;
|
|
ImGuiWindow* window = g.CurrentWindow;
|
|
@@ -1041,7 +1041,7 @@ bool ImGui::ScrollbarEx(const ImRect& bb_frame, ImGuiID id, ImGuiAxis axis, ImS6
|
|
// Render
|
|
// Render
|
|
const ImU32 bg_col = GetColorU32(ImGuiCol_ScrollbarBg);
|
|
const ImU32 bg_col = GetColorU32(ImGuiCol_ScrollbarBg);
|
|
const ImU32 grab_col = GetColorU32(held ? ImGuiCol_ScrollbarGrabActive : hovered ? ImGuiCol_ScrollbarGrabHovered : ImGuiCol_ScrollbarGrab, alpha);
|
|
const ImU32 grab_col = GetColorU32(held ? ImGuiCol_ScrollbarGrabActive : hovered ? ImGuiCol_ScrollbarGrabHovered : ImGuiCol_ScrollbarGrab, alpha);
|
|
- window->DrawList->AddRectFilled(bb_frame.Min, bb_frame.Max, bg_col, window->WindowRounding, flags);
|
|
|
|
|
|
+ window->DrawList->AddRectFilled(bb_frame.Min, bb_frame.Max, bg_col, window->WindowRounding, draw_rounding_flags);
|
|
ImRect grab_rect;
|
|
ImRect grab_rect;
|
|
if (axis == ImGuiAxis_X)
|
|
if (axis == ImGuiAxis_X)
|
|
grab_rect = ImRect(ImLerp(bb.Min.x, bb.Max.x, grab_v_norm), bb.Min.y, ImLerp(bb.Min.x, bb.Max.x, grab_v_norm) + grab_h_pixels, bb.Max.y);
|
|
grab_rect = ImRect(ImLerp(bb.Min.x, bb.Max.x, grab_v_norm), bb.Min.y, ImLerp(bb.Min.x, bb.Max.x, grab_v_norm) + grab_h_pixels, bb.Max.y);
|