From ab9217049a5f7c5a1a90b4c7c21a04f6d87e3e58 Mon Sep 17 00:00:00 2001 From: ozlb Date: Wed, 5 Aug 2020 04:59:05 +0200 Subject: [PATCH] PlotText color PlotText color properties inherited from ImGuiCol_Text, so it can be customized by `ImGui::PushStyleColor(ImGuiCol_Text, );` --- implot.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/implot.cpp b/implot.cpp index 12949dd..aeadf9a 100644 --- a/implot.cpp +++ b/implot.cpp @@ -3439,10 +3439,11 @@ void PlotText(const char* text, double x, double y, bool vertical, const ImVec2& ImDrawList & DrawList = *ImGui::GetWindowDrawList(); PushPlotClipRect(); ImVec2 pos = PlotToPixels(ImPlotPoint(x,y)) + pixel_offset; + ImU32 colTxt = ImGui::GetColorU32(ImGuiCol_Text); if (vertical) - AddTextVertical(&DrawList, text, pos, gp.Col_Txt); + AddTextVertical(&DrawList, text, pos, colTxt); else - DrawList.AddText(pos, gp.Col_Txt, text); + DrawList.AddText(pos, colTxt, text); PopPlotClipRect(); }