fix build error

This commit is contained in:
tildearrow 2021-12-18 18:00:08 -05:00
parent 9d8a2f780b
commit c40f1bbe4e

View file

@ -79,7 +79,6 @@ int PlotNoLerpEx(ImGuiPlotType plot_type, const char* label, float (*values_gett
IM_ASSERT(v_idx >= 0 && v_idx < values_count);
const float v0 = values_getter(data, (v_idx + values_offset) % values_count);
const float v1 = values_getter(data, (v_idx + 1 + values_offset) % values_count);
if (plot_type == ImGuiPlotType_Lines)
ImGui::SetTooltip("%d: %8.4g", v_idx, v0);
else if (plot_type == ImGuiPlotType_Histogram)
@ -93,7 +92,6 @@ int PlotNoLerpEx(ImGuiPlotType plot_type, const char* label, float (*values_gett
float v0 = values_getter(data, (0 + values_offset) % values_count);
float t0 = 0.0f;
ImVec2 tp0 = ImVec2( t0, 1.0f - ImSaturate((v0 - scale_min) * inv_scale) ); // Point in the normalized space of our target rectangle
float histogram_zero_line_t = (scale_min * scale_max < 0.0f) ? (1 + scale_min * inv_scale) : (scale_min < 0.0f ? 0.0f : 1.0f); // Where does the zero line stands
const ImU32 col_base = ImGui::GetColorU32((plot_type == ImGuiPlotType_Lines) ? ImGuiCol_PlotLines : ImGuiCol_PlotHistogram);
const ImU32 col_hovered = ImGui::GetColorU32((plot_type == ImGuiPlotType_Lines) ? ImGuiCol_PlotLinesHovered : ImGuiCol_PlotHistogramHovered);
@ -146,4 +144,4 @@ void PlotNoLerp(const char* label, const float* values, int values_count, int va
{
FurnacePlotArrayGetterData data(values, stride);
PlotNoLerpEx(ImGuiPlotType_Lines, label, &Plot_ArrayGetter, (void*)&data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size);
}
}