Closed cingelmarekmt closed 11 months ago
Hi,
What needs to be done to find out if the point has been clicked? I tried this but it doesn't work:
if (ImPlot::DragPoint(index * 4 + 0, &p0.x, &p0.y, isActive ? ImVec4(1, 0, 0, 1) : ImVec4(0, 1, 0, 1), 4, flags)) { // TODO move point } if (!ImPlot::IsPlotHovered() && ImGui::IsItemReleased(ImGuiMouseButton_Left) && ImGui::IsItemHovered(ImGuiHoveredFlags_None)) { // TODO activate point (change color) or delete point from plot }
Is there an example?
Thank you for your response
This is beyond the current scope of DragPoint. For more sophisticated input handling, I suggest you create your own version of this function. It is a very small amount of code.
Hi,
What needs to be done to find out if the point has been clicked? I tried this but it doesn't work:
Is there an example?
Thank you for your response