From 8558a35fa9cfd4da8f31d3d6a3824ae52021470c Mon Sep 17 00:00:00 2001 From: Nahor Date: Fri, 24 Nov 2023 12:54:16 -0800 Subject: [PATCH] Display mouse coordinates when dragging/selecting When dragging a plot, or when doing a box-selection, the mouse is "captured" by Implot, i.e. the plot remains affected even when the mouse is moved outside the plot area. As such, the mouse coordinates should remain visible. --- implot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/implot.cpp b/implot.cpp index d9260281..6d47e2cb 100644 --- a/implot.cpp +++ b/implot.cpp @@ -2922,7 +2922,7 @@ void EndPlot() { } // render mouse pos - if (!ImHasFlag(plot.Flags, ImPlotFlags_NoMouseText) && (plot.Hovered || ImHasFlag(plot.MouseTextFlags, ImPlotMouseTextFlags_ShowAlways))) { + if (!ImHasFlag(plot.Flags, ImPlotFlags_NoMouseText) && (plot.Hovered || plot.Held || plot.Selecting || ImHasFlag(plot.MouseTextFlags, ImPlotMouseTextFlags_ShowAlways))) { const bool no_aux = ImHasFlag(plot.MouseTextFlags, ImPlotMouseTextFlags_NoAuxAxes); const bool no_fmt = ImHasFlag(plot.MouseTextFlags, ImPlotMouseTextFlags_NoFormat);