1
0
mirror of https://github.com/ocornut/imgui.git synced 2025-01-18 01:06:45 +01:00

Plot: Fixed calling with values_count == 0

This commit is contained in:
ocornut 2016-10-08 12:43:30 +02:00
parent 51111b0ed5
commit fa73e5aa0e

View File

@ -7080,6 +7080,8 @@ void ImGui::PlotEx(ImGuiPlotType plot_type, const char* label, float (*values_ge
RenderFrame(frame_bb.Min, frame_bb.Max, GetColorU32(ImGuiCol_FrameBg), true, style.FrameRounding);
if (values_count > 0)
{
int res_w = ImMin((int)graph_size.x, values_count) + ((plot_type == ImGuiPlotType_Lines) ? -1 : 0);
int item_count = values_count + ((plot_type == ImGuiPlotType_Lines) ? -1 : 0);
@ -7134,6 +7136,7 @@ void ImGui::PlotEx(ImGuiPlotType plot_type, const char* label, float (*values_ge
t0 = t1;
tp0 = tp1;
}
}
// Text overlay
if (overlay_text)