mirror of
https://github.com/gwm17/implot.git
synced 2024-11-26 12:18:52 -05:00
render x-axis drag/drop hover (#149)
Co-authored-by: Philippe Kehl <philippe.kehl@fixposition.com>
This commit is contained in:
parent
6e2499093b
commit
e64df657b2
10
implot.cpp
10
implot.cpp
|
@ -2279,6 +2279,16 @@ void EndPlot() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// render x-axis drag/drop hover
|
||||||
|
if (plot.XAxis.Present && ImGui::IsDragDropPayloadBeingAccepted()) {
|
||||||
|
if (plot.XAxis.ExtHovered) {
|
||||||
|
float y_loc = plot.XAxis.HoverRect.Min.y;
|
||||||
|
ImVec2 p1(plot.XAxis.HoverRect.Min.x - 5, y_loc - 5);
|
||||||
|
ImVec2 p2(plot.XAxis.HoverRect.Max.x + 5, y_loc + 5);
|
||||||
|
DrawList.AddRect(p1, p2, ImGui::GetColorU32(ImGuiCol_DragDropTarget), 0.0f, ImDrawCornerFlags_All, 2.0f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PushPlotClipRect();
|
PushPlotClipRect();
|
||||||
// render selection/query
|
// render selection/query
|
||||||
if (plot.Selecting) {
|
if (plot.Selecting) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user